asn.1/Makefile
author Krista Grothoff <krista@pep-project.org>
Thu, 27 Oct 2016 21:58:13 +0200
changeset 1345 3c27d945fe92
parent 743 e4b613ebac2f
child 1513 e7f7e42385b5
permissions -rw-r--r--
ENGINE-129: merge into default
     1 include ../Makefile.conf
     2 
     3 ifeq ($(BUILD_ON),Linux)
     4 ifeq ($(BUILD_FOR),Linux)
     5 
     6 CC=gcc
     7 CFLAGS?=-fPIC
     8 else
     9 $(error don't know how to make for $(BUILD_FOR) on $(BUILD_ON))
    10 endif
    11 endif
    12 
    13 ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
    14 ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
    15 
    16 libasn1.a: $(ALL_OBJECTS)
    17 	ar -rc $@ $(ALL_OBJECTS)
    18 
    19 generate: Sync-Protocols.c
    20 	rm -f converter-sample.c
    21 
    22 %.o: %.c %.h
    23 	$(CC) $(CFLAGS) $(OPTIMIZE) -I. -I$(ASN1C_INCLUDE) -c $< -o $@
    24 
    25 Sync-Protocols.c: protocols.asn1 devicegroup.asn1 pEp.asn1
    26 	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message pEp.asn1 devicegroup.asn1 $<
    27 
    28 .PHONY: clean
    29 
    30 clean:
    31 	rm -f *.a *.o *.c *.h *.sample