asn.1/Makefile
author Krista Bennett <krista@pep-project.org>
Wed, 07 Feb 2018 16:47:05 +0100
branchENGINE-250
changeset 2485 c2c187994495
parent 2210 17c30881c885
child 2829 e444c3c960bb
permissions -rw-r--r--
Closing branch (not "brain", as I originally wrote...)
     1 # Copyright 2017, pEp Foundation
     2 # This file is part of pEpEngine
     3 # This file may be used under the terms of the GNU General Public License version 3
     4 # see LICENSE.txt
     5 
     6 include ../default.conf
     7 
     8 ALL_SOURCE=$(wildcard *.c)
     9 ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
    10 
    11 libasn1.a: $(ALL_OBJECTS)
    12 	ar -rc $@ $^
    13 
    14 # "converter-sample.c" is the example file containing a "main()" function generated by ans1c.
    15 .PHONY: generate
    16 generate: Sync-Protocols.c
    17 	rm -f converter-sample.c
    18 
    19 %.o: %.c %.h
    20 	$(CC) $(CFLAGS) $(CFLAGS_GENERATED) -I. $(ASN1C_INC) -c $< -o $@
    21 
    22 Sync-Protocols.c: pEp.asn1 devicegroup.asn1 protocols.asn1
    23 	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message $^
    24 
    25 .PHONY: clean
    26 clean:
    27 	rm -f *.a *.o *.c *.h *.sample
    28 
    29 .PHONY: install
    30 install: libasn1.a
    31 	cp $< $(PREFIX)/lib/
    32 
    33 .PHONY: uninstall
    34 uninstall:
    35 	rm -f $(PREFIX)/lib/libasn1.a