]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_asn1/Makefile
Security-58286.230.21.tar.gz
[apple/security.git] / OSX / libsecurity_asn1 / Makefile
1
2 CONFIG ?= DEBUG_EMU
3 CFLAGS_DEBUG_ARM = -O0 -gdwarf-2 -arch armv6
4 CFLAGS_RELEASE_ARM = -arch armv6 -Os -gdwarf-2 -Wuninitialized -DNDEBUG
5 CFLAGS_DEBUG_EMU = -O0 -gdwarf-2 -DDEBUG
6 CFLAGS_RELEASE_EMU = -gdwarf-2 -Os -Wuninitialized -DNDEBUG
7
8 WFLAGS = -Wno-trigraphs -Werror -Wunused-function \
9 -Wunused-label -Wunused-variable -Wunknown-pragmas \
10 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas \
11 -Wmissing-prototypes
12
13 CFLAGS = --std=c99 -pipe \
14 -fpascal-strings -fasm-blocks -fmessage-length=0 \
15 $(WFLAGS) $(CFLAGS_$(CONFIG))
16
17 LDFLAGS := -Wl,-dylib -Wl,-dead_strip -Wl,-exported_symbols_list lib/security_asn1.exp
18
19
20
21 HEADER_PATHS := . .. ../libDER
22 CFLAGS += $(addprefix -I$(include),$(HEADER_PATHS))
23
24 SOURCES = \
25 lib/oidsattr.c \
26 lib/oidsalg.c \
27 lib/SecAsn1Coder.c \
28 lib/SecAsn1Templates.c \
29 \
30 lib/X509Templates.c \
31 lib/certExtensionTemplates.c \
32 lib/csrTemplates.c \
33 lib/keyTemplates.c \
34 lib/nameTemplates.c \
35 lib/ocspTemplates.c \
36 lib/osKeyTemplates.c \
37 lib/pkcs12Templates.c \
38 lib/pkcs7Templates.c \
39 \
40 lib/nsprPortX.c \
41 lib/nssUtils.c \
42 lib/plarena.c \
43 lib/secErrorStr.c \
44 \
45 lib/secasn1d.c \
46 lib/secasn1e.c \
47 lib/secasn1u.c \
48 lib/secport.c
49
50 PUBLIC_HEADERS = \
51 lib/SecAsn1Coder.h \
52 lib/SecAsn1Templates.h \
53 lib/SecAsn1Types.h \
54 lib/oidsattr.h \
55 lib/oidsalg.h \
56 lib/oidsbase.h
57
58 PRIVATE_HEADERS = \
59 lib/secasn1t.h \
60 lib/X509Templates.h \
61 lib/asn1Templates.h \
62 lib/certExtensionTemplates.h \
63 lib/csrTemplates.h \
64 lib/keyTemplates.h \
65 lib/nameTemplates.h \
66 lib/nssUtils.h \
67 lib/nssilckt.h \
68 lib/nssilock.h \
69 lib/nsslocks.h \
70 lib/ocspTemplates.h \
71 lib/osKeyTemplates.h \
72 lib/pkcs7Templates.h \
73 lib/pkcs12Templates.h \
74 lib/plarena.h \
75 lib/prinit.h
76
77 INTERNAL_HEADERS = lib/plarenas.h lib/plstr.h lib/prbit.h lib/prcpucfg.h lib/prcvar.h lib/prenv.h \
78 lib/prerr.h lib/prerror.h lib/prinrval.h lib/prlock.h lib/prlog.h lib/prlong.h lib/prmem.h lib/prmon.h \
79 lib/protypes.h lib/prthread.h lib/prtime.h lib/prtypes.h lib/prvrsion.h lib/secasn1.h lib/seccomon.h \
80 lib/secerr.h lib/secport.h
81
82 OBJECTS := $(SOURCES:.c=.o)
83
84 all: install-headers build
85
86 install-headers: $(PUBLIC_HEADERS) $(PRIVATE_HEADERS) $(INTERNAL_HEADERS)
87 @install -d Security
88 @install -d security_asn1
89 @install -m 0444 $(PUBLIC_HEADERS) $(PRIVATE_HEADERS) Security
90 @install -m 0444 $(INTERNAL_HEADERS) security_asn1
91
92 build: $(OBJECTS)
93 $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -dynamic -compatibility_version 0 -current_version 0 -install_name libasn1.dylib -o libasn1.dylib $(OBJECTS)
94
95 clean:
96 @rm -f $(OBJECTS) $(PROGNAME)
97
98 tags: $(SOURCES) $(PROG)
99 etags $+
100
101