2 # C++ source (with .cpp extension)
3 CPSOURCE= dotMacTool.cpp keyPicker.cpp
4 # C source (.c extension)
6 OFILES = $(CSOURCE:%.c=%.o) $(CPSOURCE:%.cpp=%.o)
8 LOCAL_BUILD= $(shell echo $(LOCAL_BUILD_DIR))
13 FRAMEWORKS=-framework Security$(VARIANT_SUFFIX) -framework CoreFoundation
14 FRAME_SEARCH= -F$(LOCAL_BUILD) -F/usr/local/SecurityPieces/Frameworks
17 CINCLUDES= $(FINCLUDES) $(PINCLUDES)
18 ###WFLAGS= -Wno-four-char-constants -Wall -Werror
19 WFLAGS= -Wno-four-char-constants -Wall -Wno-deprecated-declarations
22 CFLAGS= -g $(CINCLUDES) $(WFLAGS) $(FRAME_SEARCH) $(DEBUG_CFLAGS)
25 # This assumes final load with cc, not ld
28 LIBPATH= -L$(LOCAL_BUILD)
29 LDFLAGS= $(LIBS) $(LIBPATH) $(FRAME_SEARCH) $(CMDLINE_LDFLAGS) -lsecurity_cdsa_utils -lsecurity_utilities
32 # Executable in build folder
34 BUILT_TARGET= $(LOCAL_BUILD)/$(EXECUTABLE)
36 first: $(BUILT_TARGET)
41 make "VARIANT_SUFFIX=,_debug"
44 make "DEBUG_CFLAGS=-arch ppc64" "CMDLINE_LDFLAGS=-arch ppc64"
47 make "DEBUG_CFLAGS=-arch ppc -arch ppc64" "CMDLINE_LDFLAGS=-arch ppc -arch ppc64"
49 $(BUILT_TARGET): $(OFILES)
50 $(CC) -o $(BUILT_TARGET) $(OFILES) $(FRAMEWORKS) $(LDFLAGS)
53 rm -f *.o $(EXECUTABLE)
56 $(CC) $(CFLAGS) -c -o $*.o $<
59 $(CC) $(CFLAGS) -c -o $*.o $<