diff --git a/src/Makefile b/src/Makefile index 481f8d7da..9eafd2caf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,13 +8,6 @@ SUBDIRS = \ # askalon \ # tools \ -ifeq ($(HOST),amber) - ifeq ($(USER),eressea) - include Makefile.corwin - endif -endif - include Makefile.include - ## more definitions diff --git a/src/Makefile.include b/src/Makefile.include index 6563b394d..9f88eb843 100644 --- a/src/Makefile.include +++ b/src/Makefile.include @@ -1,32 +1,42 @@ ## include this File in all Makefiles for Eressea +ifndef ERESSEA + export ERESSEA=$(PWD) +endif + default: debug -ifndef ERESSEA - MAKEENV = echo "Missing ERESSEA environment variable." && exit 1 -endif +DEPEND = @g++ -MM -MG -r +AR = @ar +CTAGS = @ctags +CC = @gcc +LD = @gcc +INSTALL = @cp +#INSTALL = install + -DEPEND = g++ -MM -MG -r -AR = ar ARFLAGS = cr - -CTAGS = ctags CTAGSFLAGS = --langmap=c:.c.h - -CC ?= @gcc -CFLAGS ?= -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \ +CFLAGS = -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \ -Wpointer-arith -Werror-implicit-function-declaration \ -Wno-char-subscripts \ -march=pentiumpro -fPIC $(INCLUDES) - -LIBS = -L$(PUBLISH_DIR) -LD = gcc LDFLAGS = $(LIBS) -#INSTALL = install -INSTALL = cp +LIBS = -L$(PUBLISH_DIR) + +ARCHITECTURE = Linux + +## +## user-defined makefiles +## + +MKFILES = $(wildcard $(ERESSEA)/$(USER).mk $(ERESSEA)/$(OSTYPE).mk $(ERESSEA)/$(HOSTTYPE).mk $(ERESSEA)/$(ARCH).mk) +ifeq ($(MKFILES), ) +else + include $(MKFILES) +endif -ARCHITECTURE=Linux ## ## Architecture-Dependent Exe and Library Names @@ -136,7 +146,7 @@ $(BUILD_DIR) $(PUBLISH_DIR): # object files: $(BUILD_DIR)/%:: $(BUILD_DIR) $(BUILD_DIR)/%.o:: %.c - @echo "Compiling $@" + @echo "Compiling $@ using $(MKFILES)" $(CC) $(CFLAGS) -o $@ -c $< ## @@ -148,9 +158,3 @@ ifeq ($(CONVERT_TRIGGERS), 1) CFLAGS += -DCONVERT_TRIGGER INCLUDES += -I. -I$(ERESSEA)/eressea/old endif - -MKFILES = $(wildcard $(USER).mk $(OSTYPE).mk $(HOSTTYPE).mk $(ARCH).mk) -ifeq ($(MKFILES), ) -else - include $(MKFILES) -endif diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index 91afd6a45..04741587e 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: eressea.h,v 1.4 2001/01/30 16:14:16 corwin Exp $ + * $Id: eressea.h,v 1.5 2001/01/30 19:32:44 enno Exp $ * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -962,6 +962,7 @@ int forbiddenid(int id); int newcontainerid(void); char *getstrtoken(void); +char *igetstrtoken(const char *s); param_t findparam(const char *s); param_t igetparam(const char *s); param_t getparam(void); diff --git a/src/corwin.mk b/src/corwin.mk new file mode 100644 index 000000000..cc7fc52c4 --- /dev/null +++ b/src/corwin.mk @@ -0,0 +1,13 @@ + +ifndef ERESSEA + export ERESSEA=$(PWD) +endif + +# Hier definieren, damit nicht '@gcc' +CC = gcc +AR = ar +CTAGS = ctags +CC = gcc +LD = gcc +INSTALL = cp +