@@ -16,8 +16,7 @@ INCLUDES := include
16
16
# ---------------------------------------------------------------------------------
17
17
# options for code generation
18
18
# ---------------------------------------------------------------------------------
19
- DEBUGFLAGS := -s
20
-
19
+ DEBUGFLAGS :=
21
20
22
21
UNAME := $(shell uname -s)
23
22
@@ -44,9 +43,11 @@ ifneq (,$(findstring Linux,$(UNAME)))
44
43
endif
45
44
46
45
ifneq (,$(findstring Darwin,$(UNAME ) ) )
47
- CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
48
- ARCH := -arch i386 -arch ppc
49
- LDFLAGS += $(ARCH)
46
+ SDK := /Developer/SDKs/MacOSX10.4u.sdk
47
+ OSXCFLAGS := -mmacosx-version-min=10.4 -isysroot $(SDK) -arch i386 -arch ppc
48
+ OSXCXXFLAGS := $(OSXCFLAGS)
49
+ CXXFLAGS += -fvisibility=hidden
50
+ LDFLAGS += -mmacosx-version-min=10.4 -arch i386 -arch ppc -Wl,-syslibroot,$(SDK)
50
51
endif
51
52
52
53
# ---------------------------------------------------------------------------------
@@ -146,13 +147,13 @@ $(OUTPUT): $(OFILES)
146
147
% .o : % .cpp
147
148
@echo $(notdir $< )
148
149
$(CXX ) -E -MMD $(CFLAGS ) $< > /dev/null
149
- $(CXX ) $(CFLAGS ) $(ARCH ) -o $@ -c $<
150
+ $(CXX ) $(OSXCXXFLAGS ) $(CFLAGS ) -o $@ -c $<
150
151
151
152
# ---------------------------------------------------------------------------------
152
153
% .o : % .c
153
154
@echo $(notdir $< )
154
155
$(CC ) -E -MMD $(CFLAGS ) $< > /dev/null
155
- $(CC ) $(CFLAGS ) $(ARCH ) -o $@ -c $<
156
+ $(CC ) $(OSXCFLAGS ) $(CFLAGS ) -o $@ -c $<
156
157
157
158
-include $(DEPENDS )
158
159
0 commit comments