Permalink
Browse files

made chipmunk and SDL_gfx to link statically

  • Loading branch information...
1 parent 0337f68 commit 8b6912dcfd48d6f3ce3d8e6c421943f92421bd13 @niksaak committed Feb 2, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 Makefile
View
@@ -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)

0 comments on commit 8b6912d

Please sign in to comment.