2008-03-25 12:25:34 +00:00
|
|
|
# makefile for uc2 BOINC example application on Macintosh.
|
2008-03-26 14:43:00 +00:00
|
|
|
# This is invoked from MakeMacExample.sh shell script.
|
|
|
|
# It should not be used by itself without the script.
|
2012-07-11 10:32:09 +00:00
|
|
|
# Updated 7/10/12 for OS 10.7 and XCode 4.3 and later
|
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
|
2015-04-14 14:13:54 +00:00
|
|
|
# Updated 4/14/15 for compatibility with Xcode 6
|
2020-05-01 11:59:37 +00:00
|
|
|
# Updated 4/30/20 for compatibility with Xcode 11 and OS 10.13
|
2012-08-03 12:11:27 +00:00
|
|
|
#
|
|
|
|
## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
|
|
|
|
## 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
|
|
|
|
#
|
2008-03-25 12:25:34 +00:00
|
|
|
|
2008-08-01 18:14:00 +00:00
|
|
|
BOINC_DIR = ../..
|
2008-03-25 12:25:34 +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
|
2012-08-03 08:58:50 +00:00
|
|
|
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
|
|
|
|
FREETYPE_DIR = $(BOINC_DIR)/../freetype-2.4.10
|
|
|
|
FTGL_DIR = $(BOINC_DIR)/../ftgl-2.1.3~rc5
|
2008-03-25 12:25:34 +00:00
|
|
|
FRAMEWORKS_DIR = /System/Library/Frameworks
|
|
|
|
|
|
|
|
CXXFLAGS = $(VARIANTFLAGS) \
|
|
|
|
-g \
|
2020-05-01 10:56:32 +00:00
|
|
|
-stdlib=libc++ \
|
2008-03-25 12:25:34 +00:00
|
|
|
-DAPP_GRAPHICS \
|
2010-02-16 11:34:18 +00:00
|
|
|
-I$(BOINC_CONFIG_DIR) \
|
2008-03-25 12:25:34 +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 \
|
2010-02-16 11:34:18 +00:00
|
|
|
-L$(BOINC_BUILD_DIR) \
|
2012-08-03 08:58:50 +00:00
|
|
|
-L$(FREETYPE_DIR)//objs/.libs \
|
|
|
|
-L$(FTGL_DIR)/src/.libs \
|
2008-03-25 12:25:34 +00:00
|
|
|
-L.
|
|
|
|
|
|
|
|
OBJ = \
|
|
|
|
uc2.o \
|
2012-08-03 08:58:50 +00:00
|
|
|
ttfont.o \
|
2012-11-09 11:36:20 +00:00
|
|
|
uc2_graphics.o \
|
|
|
|
slide_show.o
|
2008-03-25 12:25:34 +00:00
|
|
|
|
2012-11-09 11:36:20 +00:00
|
|
|
PROGS = uc2 uc2_graphics slide_show
|
2008-03-25 12:25:34 +00:00
|
|
|
|
|
|
|
all: $(PROGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
/bin/rm -f $(PROGS) $(OBJ)
|
2012-08-03 08:58:50 +00:00
|
|
|
|
|
|
|
uc2.o: uc2.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c uc2.cpp
|
|
|
|
|
|
|
|
ttfont.o: $(BOINC_API_DIR)/ttfont.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c $(BOINC_API_DIR)/ttfont.cpp
|
|
|
|
|
|
|
|
uc2_graphics.o: uc2_graphics.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c uc2_graphics.cpp
|
2008-03-25 12:25:34 +00:00
|
|
|
|
2012-11-09 11:36:20 +00:00
|
|
|
slide_show.o: slide_show.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c slide_show.cpp
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2: uc2.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
2008-03-26 14:43:00 +00:00
|
|
|
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o uc2 uc2.o -lboinc_api -lboinc
|
2008-03-25 12:25:34 +00:00
|
|
|
|
2012-08-03 08:58:50 +00:00
|
|
|
uc2_graphics: uc2_graphics.o ttfont.o $(BOINC_BUILD_DIR)/libboinc.a\
|
2012-11-09 11:36:20 +00:00
|
|
|
$(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
2012-08-03 08:58:50 +00:00
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o uc2_graphics uc2_graphics.o ttfont.o\
|
|
|
|
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lfreetype -lftgl -lz -lbz2\
|
2020-05-01 10:56:32 +00:00
|
|
|
-framework AppKit -framework GLUT -framework OpenGL -framework IOSurface
|
2012-11-09 11:36:20 +00:00
|
|
|
|
|
|
|
slide_show: slide_show.o $(BOINC_BUILD_DIR)/libboinc.a\
|
|
|
|
$(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o slide_show slide_show.o\
|
|
|
|
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lboinc_zip\
|
2020-05-01 10:56:32 +00:00
|
|
|
-framework AppKit -framework GLUT -framework OpenGL -framework IOSurface
|
|
|
|
|