2008-03-26 14:43:00 +00:00
|
|
|
# stand-alone makefile for uc2 BOINC example application on Macintosh.
|
2009-03-27 05:25:58 +00:00
|
|
|
# Updated 5/26/09
|
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
|
|
|
|
BOINC_LIB_LINK_DIR = $(BOINC_DIR)/mac_build/build/Deployment
|
|
|
|
FRAMEWORKS_DIR = /System/Library/Frameworks
|
|
|
|
|
|
|
|
CXXFLAGS_ALL = \
|
|
|
|
-g \
|
|
|
|
-DAPP_GRAPHICS \
|
|
|
|
-I$(BOINC_DIR) \
|
|
|
|
-I$(BOINC_DIR)/clientgui/mac/ \
|
|
|
|
-I$(BOINC_LIB_DIR) \
|
|
|
|
-I$(BOINC_API_DIR) \
|
|
|
|
-L$(BOINC_LIB_LINK_DIR) \
|
|
|
|
-L.
|
|
|
|
|
|
|
|
CC_PPC = /usr/bin/gcc-3.3
|
|
|
|
CXX_PPC = /usr/bin/g++-3.3
|
|
|
|
CXXFLAGS_PPC = -arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.3.9.sdk \
|
|
|
|
-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 $(CXXFLAGS_ALL)
|
|
|
|
LDFLAGS_PPC = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk,-arch,ppc
|
|
|
|
|
|
|
|
CC_i386 = /usr/bin/gcc-4.0
|
|
|
|
CXX_i386 = /usr/bin/g++-4.0
|
|
|
|
CXXFLAGS_i386 = -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
2008-04-02 00:23:30 +00:00
|
|
|
-mmacosx-version-min=10.4 \
|
2009-03-27 05:25:58 +00:00
|
|
|
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
2008-03-26 14:43:00 +00:00
|
|
|
LDFLAGS_i386 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,i386
|
|
|
|
|
|
|
|
CC_x86_64 = /usr/bin/gcc-4.0
|
|
|
|
CXX_x86_64 = /usr/bin/g++-4.0
|
|
|
|
CXXFLAGS_x86_64 = -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
2008-04-02 00:23:30 +00:00
|
|
|
-mmacosx-version-min=10.5 \
|
2009-03-27 05:25:58 +00:00
|
|
|
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
2008-03-26 14:43:00 +00:00
|
|
|
LDFLAGS_x86_64 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk,-arch,x86_64
|
|
|
|
|
|
|
|
|
2009-03-27 05:25:58 +00:00
|
|
|
LIBJPEG = ../../../jpeg-6b/libjpeg.a
|
2008-03-26 14:43:00 +00:00
|
|
|
|
|
|
|
OBJ = \
|
|
|
|
uc2_ppc.o \
|
|
|
|
uc2_graphics_ppc.o \
|
|
|
|
uc2_i386.o \
|
|
|
|
uc2_graphics_i386.o \
|
|
|
|
uc2_x86_64.o \
|
|
|
|
uc2_graphics_x86_64.o \
|
|
|
|
|
|
|
|
PROGS = uc2_ppc uc2_graphics_ppc uc2_i386 uc2_graphics_i386 uc2_x86_64 uc2_graphics_x86_64
|
|
|
|
|
|
|
|
all: $(PROGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
/bin/rm -f $(PROGS) $(OBJ)
|
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_ppc.o: uc2.cpp
|
|
|
|
$(CXX_PPC) -c $(CXXFLAGS_PPC) uc2.cpp -o uc2_ppc.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_graphics_ppc.o: uc2_graphics.cpp
|
|
|
|
$(CXX_PPC) -c $(CXXFLAGS_PPC) uc2_graphics.cpp -o uc2_graphics_ppc.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_i386.o: uc2.cpp
|
|
|
|
$(CXX_i386) -c $(CXXFLAGS_i386) uc2.cpp -o uc2_i386.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_graphics_i386.o: uc2_graphics.cpp
|
|
|
|
$(CXX_i386) -c $(CXXFLAGS_i386) uc2_graphics.cpp -o uc2_graphics_i386.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_x86_64.o: uc2.cpp
|
|
|
|
$(CXX_x86_64) -c $(CXXFLAGS_x86_64) uc2.cpp -o uc2_x86_64.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
2008-09-26 18:06:27 +00:00
|
|
|
uc2_graphics_x86_64.o: uc2_graphics.cpp
|
|
|
|
$(CXX_x86_64) -c $(CXXFLAGS_x86_64) uc2_graphics.cpp -o uc2_graphics_x86_64.o
|
2008-03-26 14:43:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
uc2_ppc: uc2_ppc.o $(BOINC_LIB_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
|
|
|
|
$(CXX_PPC) $(CXXFLAGS_PPC) $(LDFLAGS_PPC) -o uc2_ppc uc2_ppc.o -lboinc_api -lboinc
|
|
|
|
|
|
|
|
uc2_graphics_ppc: uc2_graphics_ppc.o $(BOINC_LIB_LINK_DIR)/libboinc.a $(BOINC_LIB_LINK_DIR)/libboinc_graphics2.a
|
|
|
|
$(CXX_PPC) $(CXXFLAGS_PPC) $(LDFLAGS_PPC) -o uc2_graphics_ppc uc2_graphics_ppc.o\
|
|
|
|
-lboinc_graphics2 -lboinc_api -lboinc \
|
|
|
|
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
|
|
|
|
|
|
|
|
uc2_i386: uc2_i386.o $(BOINC_LIB_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
|
|
|
|
$(CXX_i386) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_i386 uc2_i386.o -lboinc_api -lboinc
|
|
|
|
|
|
|
|
uc2_graphics_i386: uc2_graphics_i386.o $(BOINC_LIB_LINK_DIR)/libboinc.a $(BOINC_LIB_LINK_DIR)/libboinc_graphics2.a
|
|
|
|
$(CXX_i386) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_graphics_i386 uc2_graphics_i386.o\
|
|
|
|
-lboinc_graphics2 -lboinc_api -lboinc \
|
|
|
|
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
|
|
|
|
|
|
|
|
uc2_x86_64: uc2_x86_64.o $(BOINC_LIB_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
|
|
|
|
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_x86_64 uc2_x86_64.o -lboinc_api -lboinc
|
|
|
|
|
|
|
|
uc2_graphics_x86_64: uc2_graphics_x86_64.o $(BOINC_LIB_LINK_DIR)/libboinc.a $(BOINC_LIB_LINK_DIR)/libboinc_graphics2.a
|
|
|
|
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_graphics_x86_64 uc2_graphics_x86_64.o\
|
|
|
|
-lboinc_graphics2 -lboinc_api -lboinc \
|
|
|
|
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
|
|
|
|
|