From 96bec2bf1f8930ff4c62c0c46bae9b2c8c64840e Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Thu, 9 May 2019 18:25:49 +0200 Subject: [PATCH] Remove some unnecessary code duplications. --- Makefile | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index af928ee..9547fb8 100644 --- a/Makefile +++ b/Makefile @@ -150,35 +150,25 @@ rogue: @echo "===> Building game.dll" ${Q}mkdir -p release $(MAKE) release/game.dll - -build/%.o: %.c - @echo "===> CC $<" - ${Q}mkdir -p $(@D) - ${Q}$(CC) -c $(CFLAGS) -o $@ $< -ifeq ($(OSTYPE), Darwin) +else ifeq ($(OSTYPE), Darwin) rogue: @echo "===> Building game.dylib" ${Q}mkdir -p release $(MAKE) release/game.dylib - -build/%.o: %.c - @echo "===> CC $<" - ${Q}mkdir -p $(@D) - ${Q}$(CC) -c $(CFLAGS) -o $@ $< else rogue: @echo "===> Building game.so" ${Q}mkdir -p release $(MAKE) release/game.so +release/game.so : CFLAGS += -fPIC +endif + build/%.o: %.c @echo "===> CC $<" ${Q}mkdir -p $(@D) ${Q}$(CC) -c $(CFLAGS) -o $@ $< -release/game.so : CFLAGS += -fPIC -endif - # ---------- ROGUE_OBJS_ = \