forked from github/server
das alte makefile behalten
This commit is contained in:
parent
0b526d533d
commit
a24d62f570
42
src/Makefile
42
src/Makefile
|
@ -1,38 +1,12 @@
|
|||
MODULES := common eressea common/triggers common/items common/spells common/races common/attributes common/gamecode common/kernel common/util common/modules
|
||||
TARGETS = subdirs
|
||||
|
||||
CC = gcc
|
||||
CFLAGS += -Wall -Wwrite-strings -Wstrict-prototypes \
|
||||
-Werror-implicit-function-declaration \
|
||||
-Wno-char-subscripts
|
||||
SUBDIRS = \
|
||||
common \
|
||||
eressea \
|
||||
mapper
|
||||
|
||||
# look for include files in
|
||||
# each of the modules
|
||||
CFLAGS += -I/cygwin/usr/include
|
||||
CFLAGS += -I.
|
||||
CFLAGS += $(patsubst %,-I%,$(MODULES))
|
||||
# extra libraries if required
|
||||
LIBS :=
|
||||
# each module will add to this
|
||||
SRC :=
|
||||
# askalon
|
||||
|
||||
# include the description for
|
||||
# each module
|
||||
include $(patsubst %,%/module.mk,$(MODULES))
|
||||
# determine the object files
|
||||
OBJ := $(patsubst %.c,%.o, $(filter %.c,$(SRC))) \
|
||||
$(patsubst %.y,%.o, $(filter %.y,$(SRC)))
|
||||
# link the program
|
||||
eressea: $(OBJ)
|
||||
$(CC) -o $@ $(OBJ) $(LIBS)
|
||||
include Makefile.include
|
||||
|
||||
%.o: %.c
|
||||
@echo Compiling $@
|
||||
@$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# include the C include
|
||||
# dependencies
|
||||
include $(OBJ:.o=.d)
|
||||
# calculate C include
|
||||
# dependencies
|
||||
%.d: %.c
|
||||
gcc -MM -MG $(CFLAGS) $< > $@
|
||||
## more definitions
|
||||
|
|
|
@ -1785,7 +1785,6 @@ piracy(unit *u)
|
|||
{
|
||||
region *r = u->region;
|
||||
ship *sh = u->ship, *sh2;
|
||||
unit *cap;
|
||||
direction_t dir, target_dir = NODIRECTION;
|
||||
int aff[MAXDIRECTIONS];
|
||||
int saff = 0;
|
||||
|
@ -1840,7 +1839,7 @@ piracy(unit *u)
|
|||
&& check_takeoff(sh, r, rc) == true) {
|
||||
|
||||
for(sh2 = rc->ships; sh2; sh2 = sh2->next) {
|
||||
cap = shipowner(rc, sh2);
|
||||
unit * cap = shipowner(rc, sh2);
|
||||
if (cap && (intlist_find(il, cap->faction->no) || all)) {
|
||||
aff[dir]++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue