From b8293bc457e81e8d516772183e87ef35f01e8d68 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 13 Dec 2012 01:49:00 -0800 Subject: [PATCH] wrapper: Fix build script and Makefile on Mac --- checkin_notes | 7 +++++++ samples/wrapper/BuildMacWrapper.sh | 6 +++--- samples/wrapper/Makefile_mac | 31 +++++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index b0d507c36a..b6fe15cae3 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7674,3 +7674,10 @@ David 12 Dec 2012 mfile.cpp vda/ vdad.cpp + +Charlie 13 Dec 2012 + - wrapper: Fix build script and Makefile on Mac. + + samples/wrapper/ + BuildMacWrapper.sh + Makefile_mac diff --git a/samples/wrapper/BuildMacWrapper.sh b/samples/wrapper/BuildMacWrapper.sh index 1fc9eedf12..6be5cda954 100644 --- a/samples/wrapper/BuildMacWrapper.sh +++ b/samples/wrapper/BuildMacWrapper.sh @@ -84,7 +84,7 @@ export VARIANTFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLO export SDKROOT="${SDKPATH}" export MACOSX_DEPLOYMENT_TARGET=10.4 -rm -f wrapper.o +rm -f *.o rm -f wrapper make -f Makefile_mac all @@ -106,7 +106,7 @@ export SDKROOT="${SDKPATH}" export MACOSX_DEPLOYMENT_TARGET=10.5 -rm -f wrapper.o +rm -f *.o rm -f wrapper make -f Makefile_mac all @@ -115,7 +115,7 @@ make -f Makefile_mac all mkdir x86_64 mv wrapper x86_64/ -rm -f wrapper.o +rm -f *.o echo echo "***************************************************" diff --git a/samples/wrapper/Makefile_mac b/samples/wrapper/Makefile_mac index 1255a06b6a..9f505aafe4 100644 --- a/samples/wrapper/Makefile_mac +++ b/samples/wrapper/Makefile_mac @@ -4,6 +4,7 @@ BOINC_DIR = ../.. BOINC_API_DIR = $(BOINC_DIR)/api BOINC_LIB_DIR = $(BOINC_DIR)/lib +BOINC_ZIP_DIR = $(BOINC_DIR)/zip BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac @@ -13,8 +14,10 @@ CXXFLAGS = $(VARIANTFLAGS) \ -I$(BOINC_DIR) \ -I$(BOINC_LIB_DIR) \ -I$(BOINC_API_DIR) \ + -I$(BOINC_ZIP_DIR) \ -L$(BOINC_API_DIR) \ -L$(BOINC_LIB_DIR) \ + -L$(BOINC_ZIP_DIR) \ -L$(BOINC_BUILD_DIR) \ -L. @@ -27,6 +30,28 @@ clean: distclean: /bin/rm -f $(PROGS) *.o - -wrapper: wrapper.o - g++ $(CXXFLAGS) -o wrapper wrapper.o -pthread -lboinc_api -lboinc + +REGEXP_OBJS = \ + regexp.o \ + regsub.o \ + regerror.o \ + regexp_memory.o \ + regexp_report.o + +regexp.o: regexp.c + $(CXX) $(CXXFLAGS) -c regexp.c + +regsub.o: regsub.c + $(CXX) $(CXXFLAGS) -c regsub.c + +regerror.o: regerror.c + $(CXX) $(CXXFLAGS) -c regerror.c + +regexp_memory.o: regexp_memory.c + $(CXX) $(CXXFLAGS) -c regexp_memory.c + +regexp_report.o: regexp_report.c + $(CXX) $(CXXFLAGS) -c regexp_report.c + +wrapper: wrapper.o $(REGEXP_OBJS) + $(CXX) $(CXXFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) -pthread -lboinc_api -lboinc -lboinc_zip