Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

made chipmunk and SDL_gfx to link statically

  • Loading branch information...
commit 8b6912dcfd48d6f3ce3d8e6c421943f92421bd13 1 parent 0337f68
@niksaak authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 Makefile
View
12 Makefile
@@ -12,12 +12,14 @@ 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
@@ -25,7 +27,7 @@ endif
all: $(EXE)
$(EXE): $(OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $?
+ $(CC) $? $(LDFLAGS) -o $@
clean:
@- $(RM) -v $(OBJECTS)

0 comments on commit 8b6912d

Please sign in to comment.
Something went wrong with that request. Please try again.