p≡p engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

3 years ago
6 years ago
3 years ago
6 years ago
2 years ago
6 years ago
3 years ago
6 years ago
6 years ago
6 years ago
6 years ago
3 years ago
6 years ago
3 years ago
3 years ago
  1. # This file is under GNU General Public License 3.0
  2. # see LICENSE.txt
  3. include ../Makefile.conf
  4. ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
  5. ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
  6. CPPFLAGS+=$(CPPFLAGS_GENERATED)
  7. ASN1C_INC+= -I.
  8. ASN1C_OPTIONS = -fincludes-quoted -fcompound-names -pdu=auto
  9. DISTRIBUTION = distribution keyreset managedgroup exploration
  10. SYNC = sync keysync trustsync groupsync
  11. STORAGE = storage messagestorage
  12. DISTRIBUTION_FILES = $(addsuffix .asn1, $(DISTRIBUTION))
  13. SYNC_FILES = $(addsuffix .asn1, $(SYNC))
  14. STORAGE_FILES = $(addsuffix .asn1, $(STORAGE))
  15. .PHONY: all clean install uninstall
  16. all: Sync.c Distribution.c Storage.c ASN1Message.c
  17. $(MAKE) libasn1.a
  18. libasn1.a: $(ALL_OBJECTS)
  19. $(AR) -rc $@ $(ALL_OBJECTS)
  20. %.o: %.c %.h
  21. $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTIMIZE) $(ASN1C_INC) -c $< -o $@
  22. Sync.c: $(SYNC_FILES) $(DISTRIBUTION_FILES) pEp.asn1
  23. $(ASN1C) -gen-PER $(ASN1C_OPTIONS) $+
  24. rm -f converter-sample.c
  25. touch Sync.c
  26. Distribution.c: $(DISTRIBUTION_FILES) pEp.asn1
  27. $(ASN1C) -gen-PER $(ASN1C_OPTIONS) $+
  28. rm -f converter-sample.c
  29. touch Distribution.c
  30. Storage.c: $(STORAGE_FILES) pEp.asn1
  31. $(ASN1C) -gen-PER $(ASN1C_OPTIONS) $+
  32. rm -f converter-sample.c
  33. touch Storage.c
  34. ASN1Message.c: message.asn1 pEp.asn1
  35. $(ASN1C) -gen-PER $(ASN1C_OPTIONS) $+
  36. rm -f converter-sample.c
  37. touch ASN1Message.c
  38. clean:
  39. rm -f *.a *.o *.c *.h *.sample \
  40. $(SYNC_FILES) $(DISTRIBUTION_FILES) $(STORAGE_FILES)
  41. install:
  42. uninstall:
  43. tags: $(wildcard *.c) $(wildcard *.h)
  44. ctags --sort=yes *.c *.h
  45. # ensure generated files are here - useful after "make clean"
  46. $(SYNC_FILES) $(DISTRIBUTION_FILES) $(STORAGE_FILES):
  47. rm -f ../codegen/.copy
  48. $(MAKE) -C ../codegen .copy