Skip to content

Commit

Permalink
made chipmunk and SDL_gfx to link statically
Browse files Browse the repository at this point in the history
  • Loading branch information
niksaak committed Feb 2, 2013
1 parent 0337f68 commit 8b6912d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Expand Up @@ -12,20 +12,22 @@ SDL_CFLAGS = $(shell sdl-config --cflags)
SDL_LDFLAGS = $(shell sdl-config --libs)

ifeq ($(BUILD), debug)
CFLAGS += $(SDL_CFLAGS) -g -O0 -Wall -pedantic -std=gnu11 -DDEBUG_MODE -Iinclude/
LDFLAGS += $(SDL_LDFLAGS) -Wall -O0 -Llib/ -lchipmunk -lSDL_gfx
CFLAGS += $(SDL_CFLAGS) -g -O0 -Wall -std=gnu11 -DDEBUG_MODE -Iinclude/
LDFLAGS += -Wl,-Bstatic -Llib/ -lchipmunk -lSDL_gfx \
-Wl,-Bdynamic -lm $(SDL_LDFLAGS)

else ifeq ($(BUILD), release)
CFLAGS += $(SDL_CFLAGS) -O3 -Wall -pedantic -std=gnu11 -DDEBUG_MODE -Iinclude/
LDFLAGS += $(SDL_LDFLAGS) -Wall -O3 -lchipmunk -lSDL_gfx
CFLAGS += $(SDL_CFLAGS) -O3 -Wall -std=gnu11 -DDEBUG_MODE -Iinclude/
LDFLAGS += -Wl,-Bstatic -lchipmunk -lSDL_gfx \
-Wl,-Bdynamic $(SDL_LDFLAGS)
endif

.PHONY: all clean cleandist

all: $(EXE)

$(EXE): $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $?
$(CC) $? $(LDFLAGS) -o $@

clean:
@- $(RM) -v $(OBJECTS)
Expand Down

0 comments on commit 8b6912d

Please sign in to comment.