Build a .dylib for OS X.

This commit is contained in:
Yamagi Burmeister 2019-05-09 18:28:10 +02:00
parent 15a25d8daa
commit 821872c798

View file

@ -143,25 +143,25 @@ ctf:
@echo "===> Building game.dll" @echo "===> Building game.dll"
$(Q)mkdir -p release $(Q)mkdir -p release
$(MAKE) release/game.dll $(MAKE) release/game.dll
else ifeq ($(OSTYPE), Darwin)
build/%.o: %.c rogue:
@echo "===> CC $<" @echo "===> Building game.dylib"
$(Q)mkdir -p $(@D) ${Q}mkdir -p release
$(Q)$(CC) -c $(CFLAGS) -o $@ $< $(MAKE) release/game.dylib
else else
ctf: ctf:
@echo "===> Building game.so" @echo "===> Building game.so"
$(Q)mkdir -p release $(Q)mkdir -p release
$(MAKE) release/game.so $(MAKE) release/game.so
release/game.so : CFLAGS += -fPIC
endif
build/%.o: %.c build/%.o: %.c
@echo "===> CC $<" @echo "===> CC $<"
$(Q)mkdir -p $(@D) $(Q)mkdir -p $(@D)
$(Q)$(CC) -c $(CFLAGS) -o $@ $< $(Q)$(CC) -c $(CFLAGS) -o $@ $<
release/game.so : CFLAGS += -fPIC
endif
# ---------- # ----------
CTF_OBJS_ = \ CTF_OBJS_ = \