-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile_mac
84 lines (65 loc) · 3.13 KB
/
Makefile_mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This should work on Mac OS 10.6 with XCode 3.2. Modify as needed for other platforms.
# Change the following to match your installation
BOINC_DIR = ../..
BOINC_API_DIR = $(BOINC_DIR)/api
BOINC_LIB_DIR = $(BOINC_DIR)/lib
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
# CernVM-Graphics Linking
CERNVMGRAPHICS_DIR = ../CernVM-Graphics
CXXFLAGS = $(VARIANTFLAGS) \
-g \
-I$(BOINC_CONFIG_DIR) \
-I$(BOINC_DIR) \
-I$(BOINC_LIB_DIR) \
-I$(BOINC_API_DIR) \
-L$(BOINC_API_DIR) \
-L$(BOINC_LIB_DIR) \
-L$(BOINC_BUILD_DIR) \
-L.
ifneq ($(wildcard $(CERNVMGRAPHICS_DIR)),)
CXXFLAGS += -DAPP_GRAPHICS \
-I$(CERNVMGRAPHICS_DIR)
endif
CC_i386 = /usr/bin/gcc-4.0
CXX_i386 = /usr/bin/g++-4.0
CXXFLAGS_i386 = -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
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 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
-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
OBJ = \
cernvm-wrapper_i386.o \
cernvm-wrapper_x86_64.o \
floppyIO*.o \
PROGS = cernvm-wrapper_i386 cernvm-wrapper_x86_64
all: $(PROGS)
clean:
rm $(PROGS) $(OBJ)
distclean:
/bin/rm -f $(PROGS) $(OBJ)
floppyIO_i386: export MACOSX_DEPLOYMENT_TARGET=10.4
floppyIO_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
cernvm-wrapper_i386: export MACOSX_DEPLOYMENT_TARGET=10.4
cernvm-wrapper_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
target floppyIO_i386.o: MACOSX_DEPLOYMENT_TARGET=10.4
floppyIO_i386.o: floppyIO.cpp
$(CXX_i386) -c $(CXXFLAGS_i386) $(CXXFLAGS) floppyIO.cpp -o floppyIO_i386.o
target cernvm-wrapper_i386.o: MACOSX_DEPLOYMENT_TARGET=10.4
cernvm-wrapper_i386.o: vbox.h helper.h cernvm-wrapper.cpp
$(CXX_i386) -c $(CXXFLAGS_i386) $(CXXFLAGS) cernvm-wrapper.cpp -o cernvm-wrapper_i386.o
target cernvm-wrapper_x86_64.o: MACOSX_DEPLOYMENT_TARGET=10.5
floppyIO_x86_64.o: floppyIO.cpp
$(CXX_x86_64) -c $(CXXFLAGS_x86_64) $(CXXFLAGS) floppyIO.cpp -o floppyIO_x86_64.o
target cernvm-wrapper_x86_64.o: MACOSX_DEPLOYMENT_TARGET=10.5
cernvm-wrapper_x86_64.o: vbox.h helper.h cernvm-wrapper.cpp
$(CXX_x86_64) -c $(CXXFLAGS_x86_64) $(CXXFLAGS) cernvm-wrapper.cpp -o cernvm-wrapper_x86_64.o
cernvm-wrapper_i386: floppyIO_i386.o cernvm-wrapper_i386.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
$(CXX_i386) $(CXXFLAGS_i386) $(CXXFLAGS) $(LDFLAGS_i386) -o cernvm-wrapper_i386 cernvm-wrapper_i386.o floppyIO_i386.o -lboinc_api -lboinc -lz
cernvm-wrapper_x86_64: floppyIO_x86_64.o cernvm-wrapper_x86_64.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(CXXFLAGS) $(LDFLAGS_x86_64) -o cernvm-wrapper_x86_64 cernvm-wrapper_x86_64.o floppyIO_x86_64.o -lboinc_api -lboinc -lz