Synch with rpgxEF Edition (Updated Makefiles)

- Added warning level var $WL
- Added missing linking against pthread on linux
This commit is contained in:
unknown 2012-07-06 15:48:30 +02:00
parent c2cca2738c
commit 720d92fd0d
3 changed files with 21 additions and 7 deletions

View file

@ -23,6 +23,13 @@ else
EXT=so EXT=so
endif endif
# warning level
ifeq ($(DEBUG), 1)
WL=-Wall
else
WL=-Wall -Wno-unused-but-set-variable
endif
# cgame objects # cgame objects
OBJ = \ OBJ = \
fx_transporter.o \ fx_transporter.o \
@ -114,9 +121,9 @@ LUAOBJ = \
# do cc for shared library # do cc for shared library
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $<
else else
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -Wno-unused-but-set-variable $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $<
endif endif
# do cc for lua # do cc for lua
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
@ -215,9 +222,9 @@ lzio.o: ../game/lzio.c; $(DO_LUACC)
build_so: $(OBJDEP) $(OBJ) $(SOOBJ) $(LUAOBJ) build_so: $(OBJDEP) $(OBJ) $(SOOBJ) $(LUAOBJ)
ifeq ($(PLATFORM), mingw32) ifeq ($(PLATFORM), mingw32)
$(CC) -shared -Wl,--export-all-symbols,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) $(CC) -shared -Wl,--export-all-symbols,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) -lm
else else
$(CC) -shared -Wl,--export-dynamic,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) $(CC) -shared -Wl,--export-dynamic,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) -lm -lpthread
endif endif
clean: clean:

View file

@ -254,7 +254,7 @@ 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) -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) -lm $(CC) -shared -Wl,--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm -lpthread
endif endif
clean: clean:

View file

@ -25,6 +25,13 @@ else
EXT=so EXT=so
endif endif
# warning level
ifeq ($(DEBUG), 1)
WL=-Wall
else
WL=-Wall -Wno-unused-but-set-variable
endif
# ui objects # ui objects
OBJ = \ OBJ = \
ui_turbolift.o \ ui_turbolift.o \
@ -80,9 +87,9 @@ SOOBJ = \
# do cc for shared libraries # do cc for shared libraries
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $<
else else
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -Wno-unused-but-set-variable $(DEFINES) -o $@ -c $< DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $<
endif endif
build_so: DO_CC=$(DO_SOCC) build_so: DO_CC=$(DO_SOCC)