Updated Makefiles

This commit is contained in:
Walter Julius Hennecke 2012-05-05 16:57:18 +02:00
parent d55b82fdc3
commit 0e5dac2239
3 changed files with 13 additions and 7 deletions

View file

@ -116,10 +116,14 @@ LUAOBJ = \
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $<
else else
DO_SOCC = $(CC) $(SOCFLAGS) -Wall $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) -Wall -Wno-unused-but-set-variable $(DEFINES) -o $@ -c $<
endif endif
# do cc for lua # do cc for lua
ifeq ($(DEBUG), 1)
DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $< DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
else
DO_LUACC = $(CC) -O2 -Wall -g3 $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
endif
build_so: DO_CC=$(DO_SOCC) build_so: DO_CC=$(DO_SOCC)

View file

@ -19,17 +19,15 @@ endif
ifeq ($(PLATFORM), mingw32) ifeq ($(PLATFORM), mingw32)
EXT=dll EXT=dll
ARCH=x86 ARCH=x86
LIBEXPAT=../libs/win32/expat/libexpat.a
else else
EXT=so EXT=so
LIBEXPAT=../libs/linux/$(ARCH)/libexpat.a
endif endif
# warning level # warning level
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
WL=-Wall WL=-Wall
else else
WL=-Wall WL=-Wall -Wno-unused-but-set-variable
endif endif
#defines #defines
@ -147,7 +145,11 @@ else
DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $<
endif endif
# do cc for lua # do cc for lua
ifeq ($(DEBUF), 1)
DO_LUACC = $(CC) -O2 -Wall -g3 $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
else
DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $< DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
endif
build_so: DO_CC=$(DO_SOCC) build_so: DO_CC=$(DO_SOCC)
@ -250,9 +252,9 @@ lzio.o: lzio.c; $(DO_LUACC)
build_so: $(OBJ) $(SOOBJ) $(LUAOBJ) build_so: $(OBJ) $(SOOBJ) $(LUAOBJ)
ifeq ($(PLATFORM), mingw32) ifeq ($(PLATFORM), mingw32)
$(CC) -shared $(WL),--export-all-symbols,-soname,qqgame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) $(LIBEXPAT) -lm $(CC) -shared -Wl,--export-all-symbols,-soname,qqgame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm
else else
$(CC) -shared $(WL),--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) $(LIBEXPAT) -lm $(CC) -shared -Wl,--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm
endif endif
clean: clean:

View file

@ -82,7 +82,7 @@ SOOBJ = \
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $<
else else
DO_SOCC = $(CC) $(SOCFLAGS) -Wall $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) -Wall -Wno-unused-but-set-variable $(DEFINES) -o $@ -c $<
endif endif
build_so: DO_CC=$(DO_SOCC) build_so: DO_CC=$(DO_SOCC)