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
|
$(OBJDIR)/%.o: %.c $(xHFILES) | $$(dir $$@).phony
|
||||||
$(CC) -o $@ -c $< $(xCFLAGS)
|
$(CC) -o $@ -c $< $(xCFLAGS)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.o: %.m $(xHFILES) | $$(dir $$@).phony
|
||||||
|
$(CC) -o $@ -c $< $(xCFLAGS)
|
||||||
|
|
||||||
# see http://www.cmcrossroads.com/article/making-directories-gnu-make
|
# see http://www.cmcrossroads.com/article/making-directories-gnu-make
|
||||||
%/.phony:
|
%/.phony:
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
|
|
|
@ -31,7 +31,7 @@ baseMFILES = $(osMFILES)
|
||||||
baseCFLAGS = $(osCFLAGS)
|
baseCFLAGS = $(osCFLAGS)
|
||||||
baseLDFLAGS = \
|
baseLDFLAGS = \
|
||||||
-shared \
|
-shared \
|
||||||
-Wl,--no-undefined -Wl,--no-allow-shlib-undefined \
|
$(osLDWarnUndefinedFlags) \
|
||||||
$(osLDFLAGS)
|
$(osLDFLAGS)
|
||||||
baseSUFFIX = $(osLIBSUFFIX)
|
baseSUFFIX = $(osLIBSUFFIX)
|
||||||
|
|
||||||
|
|
|
@ -14,5 +14,10 @@ osHFILES = \
|
||||||
osCFLAGS = -mmacosx-version-min=10.7 -DMACOSX_DEPLOYMENT_TARGET=10.7
|
osCFLAGS = -mmacosx-version-min=10.7 -DMACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
osLDFLAGS = -mmacosx-version-min=10.7 -lobjc -framework Foundation -framework AppKit
|
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
|
osLIBSUFFIX = .dylib
|
||||||
osEXESUFFIX =
|
osEXESUFFIX =
|
||||||
|
|
|
@ -25,5 +25,7 @@ osLDFLAGS = \
|
||||||
-fPIC \
|
-fPIC \
|
||||||
`pkg-config --libs gtk+-3.0`
|
`pkg-config --libs gtk+-3.0`
|
||||||
|
|
||||||
|
osLDWarnUndefinedFlags = -Wl,--no-undefined -Wl,--no-allow-shlib-undefined
|
||||||
|
|
||||||
osLIBSUFFIX = .so
|
osLIBSUFFIX = .so
|
||||||
osEXESUFFIX =
|
osEXESUFFIX =
|
||||||
|
|
|
@ -24,6 +24,8 @@ osLDFLAGS = \
|
||||||
-static-libgcc \
|
-static-libgcc \
|
||||||
-luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid
|
-luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid
|
||||||
|
|
||||||
|
osLDWarnUndefinedFlags = -Wl,--no-undefined -Wl,--no-allow-shlib-undefined
|
||||||
|
|
||||||
osLIBSUFFIX = .dll
|
osLIBSUFFIX = .dll
|
||||||
osEXESUFFIX = .exe
|
osEXESUFFIX = .exe
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue