Fixed build system for OS X builds.
This commit is contained in:
parent
440949a60a
commit
0e16aa4d7c
|
@ -35,6 +35,9 @@ $(OUT): $(OFILES) | $(OUTDIR)/.phony
|
|||
$(OBJDIR)/%.o: %.c $(xHFILES) | $$(dir $$@).phony
|
||||
$(CC) -o $@ -c $< $(xCFLAGS)
|
||||
|
||||
$(OBJDIR)/%.o: %.m $(xHFILES) | $$(dir $$@).phony
|
||||
$(CC) -o $@ -c $< $(xCFLAGS)
|
||||
|
||||
# see http://www.cmcrossroads.com/article/making-directories-gnu-make
|
||||
%/.phony:
|
||||
mkdir -p $(dir $@)
|
||||
|
|
|
@ -31,7 +31,7 @@ baseMFILES = $(osMFILES)
|
|||
baseCFLAGS = $(osCFLAGS)
|
||||
baseLDFLAGS = \
|
||||
-shared \
|
||||
-Wl,--no-undefined -Wl,--no-allow-shlib-undefined \
|
||||
$(osLDWarnUndefinedFlags) \
|
||||
$(osLDFLAGS)
|
||||
baseSUFFIX = $(osLIBSUFFIX)
|
||||
|
||||
|
|
|
@ -14,5 +14,10 @@ osHFILES = \
|
|||
osCFLAGS = -mmacosx-version-min=10.7 -DMACOSX_DEPLOYMENT_TARGET=10.7
|
||||
osLDFLAGS = -mmacosx-version-min=10.7 -lobjc -framework Foundation -framework AppKit
|
||||
|
||||
# the gcc flags don't work with Apple's linker
|
||||
# fortunately, we don't need any; Apple's linker warns about undefined symbols in -shared builds!
|
||||
osLDWarnUndefinedFlags =
|
||||
|
||||
|
||||
osLIBSUFFIX = .dylib
|
||||
osEXESUFFIX =
|
||||
|
|
|
@ -25,5 +25,7 @@ osLDFLAGS = \
|
|||
-fPIC \
|
||||
`pkg-config --libs gtk+-3.0`
|
||||
|
||||
osLDWarnUndefinedFlags = -Wl,--no-undefined -Wl,--no-allow-shlib-undefined
|
||||
|
||||
osLIBSUFFIX = .so
|
||||
osEXESUFFIX =
|
||||
|
|
|
@ -24,6 +24,8 @@ osLDFLAGS = \
|
|||
-static-libgcc \
|
||||
-luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid
|
||||
|
||||
osLDWarnUndefinedFlags = -Wl,--no-undefined -Wl,--no-allow-shlib-undefined
|
||||
|
||||
osLIBSUFFIX = .dll
|
||||
osEXESUFFIX = .exe
|
||||
|
||||
|
|
Loading…
Reference in New Issue