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