2008-03-26 14:43:00 +00:00
|
|
|
# stand-alone makefile for uc2 BOINC example application on Macintosh.
|
2010-02-16 11:34:18 +00:00
|
|
|
# Updated 2/16/10 for OS 10.6 and XCode 3.2
|
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
|
2010-02-16 11:34:18 +00:00
|
|
|
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
|
|
|
|
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
|
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) \
|
2010-02-16 11:34:18 +00:00
|
|
|
-L$(BOINC_BUILD_DIR) \
|
2008-03-26 14:43:00 +00:00
|
|
|
-L.
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
CC_PPC = /usr/bin/gcc-4.0
|
|
|
|
CXX_PPC = /usr/bin/g++-4.0
|
|
|
|
CXXFLAGS_PPC = -arch ppc -mmacosx-version-min=10.4 \
|
2010-02-16 12:46:40 +00:00
|
|
|
-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
|
|
|
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
|
|
|
LDFLAGS_PPC = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,ppc
|
2010-02-16 11:34:18 +00:00
|
|
|
|
2008-03-26 14:43:00 +00:00
|
|
|
|
|
|
|
CC_i386 = /usr/bin/gcc-4.0
|
|
|
|
CXX_i386 = /usr/bin/g++-4.0
|
2010-02-16 11:34:18 +00:00
|
|
|
CXXFLAGS_i386 = -arch i386 -mmacosx-version-min=10.4 \
|
2010-02-16 12:46:40 +00:00
|
|
|
-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
|
|
|
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
|
|
|
LDFLAGS_i386 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,i386
|
2008-03-26 14:43:00 +00:00
|
|
|
|
|
|
|
CC_x86_64 = /usr/bin/gcc-4.0
|
|
|
|
CXX_x86_64 = /usr/bin/g++-4.0
|
2010-02-16 11:34:18 +00:00
|
|
|
CXXFLAGS_x86_64 = -arch x86_64 -mmacosx-version-min=10.5 \
|
2010-02-16 12:46:40 +00:00
|
|
|
-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
|
|
|
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
|
|
|
LDFLAGS_x86_64 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk,-arch,x86_64
|
2008-03-26 14:43:00 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2_ppc: uc2_ppc.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
2008-03-26 14:43:00 +00:00
|
|
|
$(CXX_PPC) $(CXXFLAGS_PPC) $(LDFLAGS_PPC) -o uc2_ppc uc2_ppc.o -lboinc_api -lboinc
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2_graphics_ppc: uc2_graphics_ppc.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
2008-03-26 14:43:00 +00:00
|
|
|
$(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)
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2_i386: uc2_i386.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
2008-03-26 14:43:00 +00:00
|
|
|
$(CXX_i386) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_i386 uc2_i386.o -lboinc_api -lboinc
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2_graphics_i386: uc2_graphics_i386.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
2008-03-26 14:43:00 +00:00
|
|
|
$(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)
|
|
|
|
|
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
|
2008-03-26 14:43:00 +00:00
|
|
|
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_x86_64 uc2_x86_64.o -lboinc_api -lboinc
|
|
|
|
|
2010-02-16 11:34:18 +00:00
|
|
|
uc2_graphics_x86_64: uc2_graphics_x86_64.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
2008-03-26 14:43:00 +00:00
|
|
|
$(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)
|
|
|
|
|