asn.1/Makefile
author Damiano Boppart <damiano@pep-security.net>
Mon, 14 Aug 2017 02:26:09 +0200
branchENGINE-228
changeset 1958 433df9ee336d
parent 1954 23ca366b1a8a
child 1960 3e0027330faa
permissions -rw-r--r--
More Makefile cleanup
damiano@1954
     1
# Copyright 2017, pEp Security SA
damiano@1954
     2
# This file is part of pEpEngine
damiano@1954
     3
# This file may be used under the terms of the GNU General Public License version 3
vb@1513
     4
# see LICENSE.txt
vb@1513
     5
vb@628
     6
include ../Makefile.conf
vb@628
     7
damiano@1954
     8
ALL_SOURCE=$(wildcard *.c)
vb@637
     9
ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
vb@637
    10
vb@637
    11
libasn1.a: $(ALL_OBJECTS)
damiano@1954
    12
	ar -rc $@ $^
vb@637
    13
damiano@1954
    14
.PHONY: generate
vb@743
    15
generate: Sync-Protocols.c
vb@637
    16
	rm -f converter-sample.c
vb@628
    17
vb@628
    18
%.o: %.c %.h
damiano@1958
    19
	$(CC) $(CFLAGS) -I. $(ASN1C_INC) -c $< -o $@
vb@628
    20
damiano@1954
    21
Sync-Protocols.c: pEp.asn1 devicegroup.asn1 protocols.asn1
damiano@1954
    22
	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message $^
vb@628
    23
vb@628
    24
.PHONY: clean
vb@628
    25
clean:
vb@637
    26
	rm -f *.a *.o *.c *.h *.sample
damiano@1919
    27
damiano@1954
    28
.PHONY: install
damiano@1919
    29
install: libasn1.a
damiano@1919
    30
	cp $< $(PREFIX)/lib/
damiano@1950
    31
damiano@1950
    32
.PHONY: uninstall
damiano@1950
    33
uninstall:
damiano@1954
    34
	rm -f $(PREFIX)/lib/libasn1.a