asn.1/Makefile
author Volker Birk <vb@pep.foundation>
Wed, 29 Aug 2018 17:10:23 +0200
branchsync
changeset 2899 63b619aef131
parent 2871 4593a7b8b6a8
child 3195 47da24127579
child 3324 b4f96bfa0052
permissions -rw-r--r--
somewhat bigger
vb@2829
     1
# This file is under GNU General Public License 3.0
vb@1513
     2
# see LICENSE.txt
vb@1513
     3
damiano@2210
     4
include ../default.conf
vb@628
     5
vb@2829
     6
ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
vb@637
     7
ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
vb@637
     8
vb@2829
     9
all: generate
vb@2829
    10
	make libasn1.a
vb@2829
    11
vb@637
    12
libasn1.a: $(ALL_OBJECTS)
vb@2829
    13
	ar -rc $@ $(ALL_OBJECTS)
vb@637
    14
vb@2829
    15
generate: Sync.c
vb@637
    16
	rm -f converter-sample.c
vb@628
    17
vb@628
    18
%.o: %.c %.h
vb@2829
    19
	$(CC) $(CFLAGS) $(OPTIMIZE) -I. -I$(ASN1C_INC) -c $< -o $@
vb@628
    20
vb@2829
    21
Sync.c: sync.asn1 keysync.asn1 pEp.asn1
vb@2899
    22
	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keysync.asn1 $<
vb@2829
    23
vb@2829
    24
sync.asn1 keysync.asn1 pEp.asn1:
vb@2829
    25
	cp -f ../sync/generated/*.asn1 ../asn.1
vb@628
    26
vb@2871
    27
.PHONY: clean install uninstall tags
vb@2829
    28
vb@628
    29
clean:
vb@2829
    30
	rm -f *.a *.o *.c *.h *.sample sync.asn1 keysync.asn1
vb@2830
    31
vb@2830
    32
install:
vb@2830
    33
vb@2830
    34
uninstall:
vb@2830
    35
vb@2871
    36
tags:
vb@2871
    37
	ctags *.c *.h