asn.1/Makefile
author Krista Bennett <krista@pep-project.org>
Tue, 22 Aug 2017 15:34:17 +0200
changeset 1988 ea7bceda4dc8
parent 1919 335cdc692960
child 1989 d3e5bc4a9854
permissions -rw-r--r--
Rolled back to revision 1982. Sorry all, checked in wrong branch to default
krista@1988
     1
# Copyright 2017, pEp Foundation
krista@1988
     2
# This file is part of pEpEngine
krista@1988
     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
krista@1988
     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)
krista@1988
    12
	ar -rc $@ $^
vb@637
    13
krista@1988
    14
# "converter-sample.c" is the example file containing a "main()" function generated by ans1c.
krista@1988
    15
.PHONY: generate
vb@743
    16
generate: Sync-Protocols.c
vb@637
    17
	rm -f converter-sample.c
vb@628
    18
vb@628
    19
%.o: %.c %.h
krista@1988
    20
	$(CC) $(CFLAGS) $(CFLAGS_GENERATED) -I. $(ASN1C_INC) -c $< -o $@
vb@628
    21
krista@1988
    22
Sync-Protocols.c: pEp.asn1 devicegroup.asn1 protocols.asn1
krista@1988
    23
	$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=PEP.Message $^
vb@628
    24
vb@628
    25
.PHONY: clean
vb@628
    26
clean:
vb@637
    27
	rm -f *.a *.o *.c *.h *.sample
damiano@1919
    28
krista@1988
    29
.PHONY: install
damiano@1919
    30
install: libasn1.a
damiano@1919
    31
	cp $< $(PREFIX)/lib/
krista@1988
    32
krista@1988
    33
.PHONY: uninstall
krista@1988
    34
uninstall:
krista@1988
    35
	rm -f $(PREFIX)/lib/libasn1.a