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.
vb@1513
     1
# This file is under GNU General Public License 3.0
vb@1513
     2
# see LICENSE.txt
vb@1513
     3
vb@628
     4
include ../Makefile.conf
vb@628
     5
Edouard@674
     6
ifeq ($(BUILD_ON),Linux)
Edouard@674
     7
ifeq ($(BUILD_FOR),Linux)
Edouard@674
     8
Edouard@674
     9
CC=gcc
Edouard@674
    10
CFLAGS?=-fPIC
Edouard@674
    11
else
Edouard@674
    12
$(error don't know how to make for $(BUILD_FOR) on $(BUILD_ON))
Edouard@674
    13
endif
Edouard@674
    14
endif
Edouard@674
    15
vb@637
    16
ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
vb@637
    17
ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
vb@637
    18
vb@637
    19
libasn1.a: $(ALL_OBJECTS)
vb@637
    20
	ar -rc $@ $(ALL_OBJECTS)
vb@637
    21
vb@743
    22
generate: Sync-Protocols.c
vb@637
    23
	rm -f converter-sample.c
vb@628
    24
vb@628
    25
%.o: %.c %.h
dirk@670
    26
	$(CC) $(CFLAGS) $(OPTIMIZE) -I. -I$(ASN1C_INCLUDE) -c $< -o $@
vb@628
    27
vb@743
    28
Sync-Protocols.c: protocols.asn1 devicegroup.asn1 pEp.asn1
vb@743
    29
	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message pEp.asn1 devicegroup.asn1 $<
vb@628
    30
vb@628
    31
.PHONY: clean
vb@628
    32
vb@628
    33
clean:
vb@637
    34
	rm -f *.a *.o *.c *.h *.sample
damiano@1919
    35
damiano@1919
    36
install: libasn1.a
damiano@1919
    37
	cp $< $(PREFIX)/lib/