asn.1/Makefile
author Edouard Tisserant
Sun, 22 May 2016 15:14:47 +0200
changeset 674 a8afa1168b12
parent 670 5a3d50d25168
child 743 e4b613ebac2f
permissions -rw-r--r--
Fixes for running pEpEngine tests in debian
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@637
    19
generate: DeviceGroup-Protocol.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@635
    25
DeviceGroup-Protocol.c: devicegroup.asn1
vb@638
    26
	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message pEp.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