asn.1/Makefile
changeset 637 d93d1fe6a24c
parent 635 c7b5872a6ea4
child 638 904464a12ab6
     1.1 --- a/asn.1/Makefile	Mon May 16 16:38:38 2016 +0200
     1.2 +++ b/asn.1/Makefile	Mon May 16 17:53:24 2016 +0200
     1.3 @@ -1,14 +1,21 @@
     1.4  include ../Makefile.conf
     1.5  
     1.6 -all: DeviceGroup-Protocol.c
     1.7 +ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
     1.8 +ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
     1.9 +
    1.10 +libasn1.a: $(ALL_OBJECTS)
    1.11 +	ar -rc $@ $(ALL_OBJECTS)
    1.12 +
    1.13 +generate: DeviceGroup-Protocol.c
    1.14 +	rm -f converter-sample.c
    1.15  
    1.16  %.o: %.c %.h
    1.17 -	$(CC) $(CFLAGS) -I$(ASN1C_INCLUDE) -c $< -o $@
    1.18 +	$(CC) $(CFLAGS) $(OPTIMIZE) -I$(ASN1C_INCLUDE) -c $< -o $@
    1.19  
    1.20  DeviceGroup-Protocol.c: devicegroup.asn1
    1.21 -	$(ASN1C) -fcompound-names -pdu=PEP.Message pEp.asn1 $<
    1.22 +	$(ASN1C) -fincludes-quoted -fcompound-names -pdu=PEP.Message pEp.asn1 $<
    1.23  
    1.24  .PHONY: clean
    1.25  
    1.26  clean:
    1.27 -	rm -f *.o *.c *.h *.sample
    1.28 +	rm -f *.a *.o *.c *.h *.sample