2008-03-26 14:43:00 +00:00
|
|
|
# stand-alone makefile for uc2 BOINC example application on Macintosh.
|
2012-07-11 10:32:09 +00:00
|
|
|
# Updated 7/11/12 for OS 10.7 and XCode 4.3
|
2012-08-03 08:58:50 +00:00
|
|
|
# Updated 8/3/12 for TrueType fonts
|
2012-11-09 11:36:20 +00:00
|
|
|
# Updated 11/8/12 to add slide_show
|
2008-03-26 14:43:00 +00:00
|
|
|
#
|
2012-11-09 11:36:20 +00:00
|
|
|
## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
|
|
|
|
## and boinc/zip/boinc_zip.xcodeproj
|
2012-08-03 12:11:27 +00:00
|
|
|
## This file assumes the locations of the needed libraries are those
|
|
|
|
## resulting from following the instructions found in the file:
|
|
|
|
## boinc/mac_build/HowToBuildBOINC_XCode.rtf
|
2012-11-09 11:36:20 +00:00
|
|
|
## In Terminal, CD to the example_app directory:
|
|
|
|
## cd [path]/example_app/
|
|
|
|
## and run this make file:
|
|
|
|
## make -f Makefile_mac2
|
2012-08-03 12:11:27 +00:00
|
|
|
#
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2008-08-01 18:14:00 +00:00
|
|
|
BOINC_DIR = ../..
|
2008-03-26 14:43:00 +00:00
|
|
|
BOINC_API_DIR = $(BOINC_DIR)/api
|
|
|
|
BOINC_LIB_DIR = $(BOINC_DIR)/lib
|
2012-11-09 11:36:20 +00:00
|
|
|
BOINC_ZIP_DIR = $(BOINC_DIR)/zip
|
2010-02-16 11:34:18 +00:00
|
|
|
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
|
|
|
|
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
|
2012-08-03 08:58:50 +00:00
|
|
|
FREETYPE_DIR = $(BOINC_DIR)/../freetype-2.4.10
|
|
|
|
FTGL_DIR = $(BOINC_DIR)/../ftgl-2.1.3~rc5
|
2008-03-26 14:43:00 +00:00
|
|
|
FRAMEWORKS_DIR = /System/Library/Frameworks
|
|
|
|
|
|
|
|
CXXFLAGS_ALL = \
|
|
|
|
-g \
|
|
|
|
-DAPP_GRAPHICS \
|
2010-02-16 11:34:18 +00:00
|
|
|
-I$(BOINC_CONFIG_DIR) \
|
2008-03-26 14:43:00 +00:00
|
|
|
-I$(BOINC_DIR) \
|
|
|
|
-I$(BOINC_LIB_DIR) \
|
|
|
|
-I$(BOINC_API_DIR) \
|
2012-11-09 11:36:20 +00:00
|
|
|
-I$(BOINC_ZIP_DIR) \
|
2012-08-03 08:58:50 +00:00
|
|
|
-I$(FREETYPE_DIR)/include \
|
|
|
|
-I$(FTGL_DIR)/src
|
|
|
|
|
|
|
|
LDFLAGS_ALL = \
|
|
|
|
-Wl,-L$(BOINC_BUILD_DIR) \
|
|
|
|
-Wl,-L$(FREETYPE_DIR)/objs/.libs \
|
|
|
|
-Wl,-L$(FTGL_DIR)/src/.libs \
|
|
|
|
-Wl,-L/usr/lib \
|
|
|
|
-Wl,-L.
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2010-10-08 10:15:40 +00:00
|
|
|
CXXFLAGS_i386 = -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
|
2010-02-16 12:46:40 +00:00
|
|
|
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
2012-08-03 08:58:50 +00:00
|
|
|
LDFLAGS_i386 = -Wl,-arch,i386 $(LDFLAGS_ALL)
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2010-10-08 10:15:40 +00:00
|
|
|
CXXFLAGS_x86_64 = -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
|
2010-02-16 12:46:40 +00:00
|
|
|
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
2012-08-03 08:58:50 +00:00
|
|
|
LDFLAGS_x86_64 = -Wl,-arch,x86_64 $(LDFLAGS_ALL)
|
2008-03-26 14:43:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
OBJ = \
|
|
|
|
uc2_i386.o \
|
2012-08-03 08:58:50 +00:00
|
|
|
ttfont_i386.o \
|
2008-03-26 14:43:00 +00:00
|
|
|
uc2_graphics_i386.o \
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show_i386.o \
|
2008-03-26 14:43:00 +00:00
|
|
|
uc2_x86_64.o \
|
2012-08-03 08:58:50 +00:00
|
|
|
ttfont_x86_64.o \
|
2008-03-26 14:43:00 +00:00
|
|
|
uc2_graphics_x86_64.o \
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show_x86_64.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-11-09 11:36:20 +00:00
|
|
|
|
|
|
|
PROGS = \
|
|
|
|
uc2_i386 uc2_graphics_i386 slide_show_i386 \
|
|
|
|
uc2_x86_64 uc2_graphics_x86_64 slide_show_x86_64
|
2008-03-26 14:43:00 +00:00
|
|
|
|
|
|
|
all: $(PROGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
/bin/rm -f $(PROGS) $(OBJ)
|
|
|
|
|
2010-10-11 11:59:05 +00:00
|
|
|
uc2_i386: export MACOSX_DEPLOYMENT_TARGET=10.4
|
|
|
|
uc2_graphics_i386: export MACOSX_DEPLOYMENT_TARGET=10.4
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show_i386: export MACOSX_DEPLOYMENT_TARGET=10.4
|
2010-10-11 11:59:05 +00:00
|
|
|
uc2_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
|
|
|
|
uc2_graphics_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
|
2010-10-11 11:59:05 +00:00
|
|
|
|
2012-11-09 11:36:20 +00:00
|
|
|
target uc2_i386: MACOSX_DEPLOYMENT_TARGET=10.4
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_i386.o: uc2.cpp
|
2012-07-11 10:32:09 +00:00
|
|
|
$(CXX) -c $(CXXFLAGS_i386) uc2.cpp -o uc2_i386.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-08-03 08:58:50 +00:00
|
|
|
ttfont_i386.o: $(BOINC_API_DIR)/ttfont.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS_i386) $(BOINC_API_DIR)/ttfont.cpp -o ttfont_i386.o
|
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_graphics_i386.o: uc2_graphics.cpp
|
2012-07-11 10:32:09 +00:00
|
|
|
$(CXX) -c $(CXXFLAGS_i386) uc2_graphics.cpp -o uc2_graphics_i386.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show_i386.o: slide_show.cpp
|
|
|
|
$(CXX) $(CXXFLAGS_i386) -c slide_show.cpp -o slide_show_i386.o
|
|
|
|
|
2010-10-11 11:59:05 +00:00
|
|
|
target uc2_x86_64: MACOSX_DEPLOYMENT_TARGET=10.5
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_x86_64.o: uc2.cpp
|
2012-07-11 10:32:09 +00:00
|
|
|
$(CXX) -c $(CXXFLAGS_x86_64) uc2.cpp -o uc2_x86_64.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-08-03 08:58:50 +00:00
|
|
|
ttfont_x86_64.o: $(BOINC_API_DIR)/ttfont.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS_x86_64) $(BOINC_API_DIR)/ttfont.cpp -o ttfont_x86_64.o
|
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_graphics_x86_64.o: uc2_graphics.cpp
|
2012-07-11 10:32:09 +00:00
|
|
|
$(CXX) -c $(CXXFLAGS_x86_64) uc2_graphics.cpp -o uc2_graphics_x86_64.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show_x86_64.o: slide_show.cpp
|
|
|
|
$(CXX) $(CXXFLAGS_x86_64) -c slide_show.cpp -o slide_show_x86_64.o
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2_i386: uc2_i386.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
2012-07-11 10:32:09 +00:00
|
|
|
$(CXX) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_i386 uc2_i386.o -lboinc_api -lboinc
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-08-03 08:58:50 +00:00
|
|
|
uc2_graphics_i386: uc2_graphics_i386.o ttfont_i386.o $(BOINC_BUILD_DIR)/libboinc.a\
|
|
|
|
$(BOINC_BUILD_DIR)/libboinc_graphics2.a $(FREETYPE_DIR/objs/.libs/libfreetype.a\
|
|
|
|
$(FTGL_DIR)/src/.libs/libftgl.a
|
2012-07-11 10:32:09 +00:00
|
|
|
$(CXX) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_graphics_i386 uc2_graphics_i386.o\
|
2012-08-03 08:58:50 +00:00
|
|
|
ttfont_i386.o -lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lfreetype -lftgl -lz\
|
|
|
|
-lbz2 -framework AppKit -framework GLUT -framework OpenGL
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show_i386: slide_show_i386.o $(BOINC_BUILD_DIR)/libboinc.a\
|
|
|
|
$(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
|
|
|
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_i386) -o slide_show_i386 slide_show_i386.o\
|
|
|
|
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lboinc_zip\
|
|
|
|
-framework AppKit -framework GLUT -framework OpenGL
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2_x86_64: uc2_x86_64.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
2012-07-11 10:32:09 +00:00
|
|
|
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_x86_64 uc2_x86_64.o -lboinc_api -lboinc
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2012-08-03 08:58:50 +00:00
|
|
|
uc2_graphics_x86_64: uc2_graphics_x86_64.o ttfont_x86_64.o $(BOINC_BUILD_DIR)/libboinc.a\
|
|
|
|
$(BOINC_BUILD_DIR)/libboinc_graphics2.a $(FREETYPE_DIR/objs/.libs/libfreetype.a\
|
|
|
|
$(FTGL_DIR)/src/.libs/libftgl.a
|
|
|
|
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_graphics_x86_64\
|
|
|
|
uc2_graphics_x86_64.o ttfont_x86_64.o -lboinc_graphics2 -lboinc_api -lboinc -ljpeg\
|
|
|
|
-lfreetype -lftgl -lz -lbz2 -framework AppKit -framework GLUT -framework OpenGL
|
2012-11-09 11:36:20 +00:00
|
|
|
|
|
|
|
slide_show_x86_64: slide_show_x86_64.o $(BOINC_BUILD_DIR)/libboinc.a\
|
|
|
|
$(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
|
|
|
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o slide_show_x86_64 slide_show_x86_64.o\
|
|
|
|
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lboinc_zip\
|
|
|
|
-framework AppKit -framework GLUT -framework OpenGL
|