]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/dotMacTool/Makefile
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / clxutils / dotMacTool / Makefile
1 EXECUTABLE=dotMacTool
2 # C++ source (with .cpp extension)
3 CPSOURCE= dotMacTool.cpp keyPicker.cpp
4 # C source (.c extension)
5 CSOURCE=
6 OFILES = $(CSOURCE:%.c=%.o) $(CPSOURCE:%.cpp=%.o)
7
8 LOCAL_BUILD= $(shell echo $(LOCAL_BUILD_DIR))
9
10 CC=c++
11 VARIANT_SUFFIX=
12
13 FRAMEWORKS=-framework Security$(VARIANT_SUFFIX) -framework CoreFoundation
14 FRAME_SEARCH= -F$(LOCAL_BUILD) -F/usr/local/SecurityPieces/Frameworks
15 FINCLUDES=
16 PINCLUDES=
17 CINCLUDES= $(FINCLUDES) $(PINCLUDES)
18 ###WFLAGS= -Wno-four-char-constants -Wall -Werror
19 WFLAGS= -Wno-four-char-constants -Wall -Wno-deprecated-declarations
20 DEBUG_CFLAGS?=
21 CMDLINE_LDFLAGS?=
22 CFLAGS= -g $(CINCLUDES) $(WFLAGS) $(FRAME_SEARCH) $(DEBUG_CFLAGS)
23
24 #
25 # This assumes final load with cc, not ld
26 #
27 LIBS= -lstdc++
28 LIBPATH= -L$(LOCAL_BUILD)
29 LDFLAGS= $(LIBS) $(LIBPATH) $(FRAME_SEARCH) $(CMDLINE_LDFLAGS) -lsecurity_cdsa_utils -lsecurity_utilities
30
31 #
32 # Executable in build folder
33 #
34 BUILT_TARGET= $(LOCAL_BUILD)/$(EXECUTABLE)
35
36 first: $(BUILT_TARGET)
37
38 install:
39
40 debug:
41 make "VARIANT_SUFFIX=,_debug"
42
43 64bit:
44 make "DEBUG_CFLAGS=-arch ppc64" "CMDLINE_LDFLAGS=-arch ppc64"
45
46 64bitFat:
47 make "DEBUG_CFLAGS=-arch ppc -arch ppc64" "CMDLINE_LDFLAGS=-arch ppc -arch ppc64"
48
49 $(BUILT_TARGET): $(OFILES)
50 $(CC) -o $(BUILT_TARGET) $(OFILES) $(FRAMEWORKS) $(LDFLAGS)
51
52 clean:
53 rm -f *.o $(EXECUTABLE)
54
55 %.o: %.c
56 $(CC) $(CFLAGS) -c -o $*.o $<
57
58 %.o: %.cpp
59 $(CC) $(CFLAGS) -c -o $*.o $<