asn.1/Makefile
author Krista Bennett <krista@pep-project.org>
Fri, 09 Jun 2017 14:31:58 +0200
changeset 1841 ca925aadd9fe
parent 1513 e7f7e42385b5
child 1919 335cdc692960
permissions -rw-r--r--
adding ENGINE-9 fix for external revoke test
     1 # This file is under GNU General Public License 3.0
     2 # see LICENSE.txt
     3 
     4 include ../Makefile.conf
     5 
     6 ifeq ($(BUILD_ON),Linux)
     7 ifeq ($(BUILD_FOR),Linux)
     8 
     9 CC=gcc
    10 CFLAGS?=-fPIC
    11 else
    12 $(error don't know how to make for $(BUILD_FOR) on $(BUILD_ON))
    13 endif
    14 endif
    15 
    16 ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
    17 ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
    18 
    19 libasn1.a: $(ALL_OBJECTS)
    20 	ar -rc $@ $(ALL_OBJECTS)
    21 
    22 generate: Sync-Protocols.c
    23 	rm -f converter-sample.c
    24 
    25 %.o: %.c %.h
    26 	$(CC) $(CFLAGS) $(OPTIMIZE) -I. -I$(ASN1C_INCLUDE) -c $< -o $@
    27 
    28 Sync-Protocols.c: protocols.asn1 devicegroup.asn1 pEp.asn1
    29 	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message pEp.asn1 devicegroup.asn1 $<
    30 
    31 .PHONY: clean
    32 
    33 clean:
    34 	rm -f *.a *.o *.c *.h *.sample