Cleanup asn.1/Makefile ENGINE-228
authorDamiano Boppart <damiano@pep-security.net>
Sun, 13 Aug 2017 02:33:06 +0200
branchENGINE-228
changeset 195423ca366b1a8a
parent 1953 e9f2e628cc12
child 1955 8ec0b81a659f
Cleanup asn.1/Makefile
asn.1/Makefile
     1.1 --- a/asn.1/Makefile	Sun Aug 13 02:22:03 2017 +0200
     1.2 +++ b/asn.1/Makefile	Sun Aug 13 02:33:06 2017 +0200
     1.3 @@ -1,41 +1,34 @@
     1.4 -# This file is under GNU General Public License 3.0
     1.5 +# Copyright 2017, pEp Security SA
     1.6 +# This file is part of pEpEngine
     1.7 +# This file may be used under the terms of the GNU General Public License version 3
     1.8  # see LICENSE.txt
     1.9  
    1.10  include ../Makefile.conf
    1.11  
    1.12 -ifeq ($(BUILD_ON),Linux)
    1.13 -ifeq ($(BUILD_FOR),Linux)
    1.14 -
    1.15 -CC=gcc
    1.16 -CFLAGS?=-fPIC
    1.17 -else
    1.18 -$(error don't know how to make for $(BUILD_FOR) on $(BUILD_ON))
    1.19 -endif
    1.20 -endif
    1.21 -
    1.22 -ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
    1.23 +ALL_SOURCE=$(wildcard *.c)
    1.24  ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
    1.25  
    1.26  libasn1.a: $(ALL_OBJECTS)
    1.27 -	ar -rc $@ $(ALL_OBJECTS)
    1.28 +	ar -rc $@ $^
    1.29  
    1.30 +.PHONY: generate
    1.31  generate: Sync-Protocols.c
    1.32  	rm -f converter-sample.c
    1.33  
    1.34  %.o: %.c %.h
    1.35 -	$(CC) $(CFLAGS) $(OPTIMIZE) -I. -I$(ASN1C_INCLUDE) -c $< -o $@
    1.36 +	$(CC) $(CFLAGS) -I. -I$(ASN1C_INCLUDE) -c $< -o $@
    1.37  
    1.38 -Sync-Protocols.c: protocols.asn1 devicegroup.asn1 pEp.asn1
    1.39 -	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message pEp.asn1 devicegroup.asn1 $<
    1.40 +Sync-Protocols.c: pEp.asn1 devicegroup.asn1 protocols.asn1
    1.41 +	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message $^
    1.42  
    1.43  .PHONY: clean
    1.44 -
    1.45  clean:
    1.46  	rm -f *.a *.o *.c *.h *.sample
    1.47  
    1.48 +.PHONY: install
    1.49  install: libasn1.a
    1.50  	cp $< $(PREFIX)/lib/
    1.51  
    1.52  .PHONY: uninstall
    1.53  uninstall:
    1.54 -	-rm -f $(PREFIX)/lib/libasn1.a
    1.55 +	rm -f $(PREFIX)/lib/libasn1.a