asn.1/Makefile
author Krista Bennett <krista@pep-project.org>
Tue, 01 Aug 2017 16:40:24 +0200
branchmessage-2.0
changeset 1979 3d0a778d035a
parent 1919 335cdc692960
child 1950 94b1fad41c43
child 1988 ea7bceda4dc8
permissions -rw-r--r--
Changed name to ENGINE-214 for JIRA tracking - please use that branch instead.
     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
    35 
    36 install: libasn1.a
    37 	cp $< $(PREFIX)/lib/