2 # C++ source (with .cpp extension)
3 CPSOURCE= certDecode.cpp
4 # C source (.c extension)
6 OFILES = $(CSOURCE:%.c=%.o) $(CPSOURCE:%.cpp=%.o)
8 LOCAL_BUILD= $(shell echo $(LOCAL_BUILD_DIR))
11 # Executable in build folder
13 BUILT_TARGET= $(LOCAL_BUILD)/$(EXECUTABLE)
17 FRAMEWORKS= -framework Security
18 FRAME_SEARCH= -F$(LOCAL_BUILD)
21 CINCLUDES= $(FINCLUDES) $(PINCLUDES)
22 WFLAGS= -Wno-four-char-constants -Wno-deprecated-declarations
23 CFLAGS= -g $(CINCLUDES) $(WFLAGS) $(FRAME_SEARCH)
26 # This assumes final load with cc, not ld
29 LIBPATH= -L$(LOCAL_BUILD)
30 LDFLAGS= $(LIBS) $(LIBPATH) $(FRAME_SEARCH) -lsecurity_cdsa_utils
32 first: $(BUILT_TARGET)
34 $(BUILT_TARGET): $(OFILES)
35 cc -o $(BUILT_TARGET) $(OFILES) $(FRAMEWORKS) $(LDFLAGS)
38 rm -f *.o $(BUILT_TARGET)
41 $(CC) $(CFLAGS) -c -o $*.o $<
44 $(CC) $(CFLAGS) -c -o $*.o $<