forked from github/server
Individuelle Makefiles, include an der korrekten Stelle, und trotzdem noch möglich, in jedem Subdirectory make aufzurufen
This commit is contained in:
parent
c0ed63b84a
commit
5d902b6f01
|
@ -8,13 +8,6 @@ SUBDIRS = \
|
||||||
# askalon \
|
# askalon \
|
||||||
# tools \
|
# tools \
|
||||||
|
|
||||||
ifeq ($(HOST),amber)
|
|
||||||
ifeq ($(USER),eressea)
|
|
||||||
include Makefile.corwin
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
include Makefile.include
|
include Makefile.include
|
||||||
|
|
||||||
|
|
||||||
## more definitions
|
## more definitions
|
||||||
|
|
|
@ -1,32 +1,42 @@
|
||||||
## include this File in all Makefiles for Eressea
|
## include this File in all Makefiles for Eressea
|
||||||
|
|
||||||
|
ifndef ERESSEA
|
||||||
|
export ERESSEA=$(PWD)
|
||||||
|
endif
|
||||||
|
|
||||||
default: debug
|
default: debug
|
||||||
|
|
||||||
ifndef ERESSEA
|
DEPEND = @g++ -MM -MG -r
|
||||||
MAKEENV = echo "Missing ERESSEA environment variable." && exit 1
|
AR = @ar
|
||||||
endif
|
CTAGS = @ctags
|
||||||
|
CC = @gcc
|
||||||
|
LD = @gcc
|
||||||
|
INSTALL = @cp
|
||||||
|
#INSTALL = install
|
||||||
|
|
||||||
|
|
||||||
DEPEND = g++ -MM -MG -r
|
|
||||||
AR = ar
|
|
||||||
ARFLAGS = cr
|
ARFLAGS = cr
|
||||||
|
|
||||||
CTAGS = ctags
|
|
||||||
CTAGSFLAGS = --langmap=c:.c.h
|
CTAGSFLAGS = --langmap=c:.c.h
|
||||||
|
CFLAGS = -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \
|
||||||
CC ?= @gcc
|
|
||||||
CFLAGS ?= -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \
|
|
||||||
-Wpointer-arith -Werror-implicit-function-declaration \
|
-Wpointer-arith -Werror-implicit-function-declaration \
|
||||||
-Wno-char-subscripts \
|
-Wno-char-subscripts \
|
||||||
-march=pentiumpro -fPIC $(INCLUDES)
|
-march=pentiumpro -fPIC $(INCLUDES)
|
||||||
|
|
||||||
LIBS = -L$(PUBLISH_DIR)
|
|
||||||
LD = gcc
|
|
||||||
LDFLAGS = $(LIBS)
|
LDFLAGS = $(LIBS)
|
||||||
|
|
||||||
#INSTALL = install
|
LIBS = -L$(PUBLISH_DIR)
|
||||||
INSTALL = cp
|
|
||||||
|
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
|
## Architecture-Dependent Exe and Library Names
|
||||||
|
@ -136,7 +146,7 @@ $(BUILD_DIR) $(PUBLISH_DIR):
|
||||||
# object files:
|
# object files:
|
||||||
$(BUILD_DIR)/%:: $(BUILD_DIR)
|
$(BUILD_DIR)/%:: $(BUILD_DIR)
|
||||||
$(BUILD_DIR)/%.o:: %.c
|
$(BUILD_DIR)/%.o:: %.c
|
||||||
@echo "Compiling $@"
|
@echo "Compiling $@ using $(MKFILES)"
|
||||||
$(CC) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -148,9 +158,3 @@ ifeq ($(CONVERT_TRIGGERS), 1)
|
||||||
CFLAGS += -DCONVERT_TRIGGER
|
CFLAGS += -DCONVERT_TRIGGER
|
||||||
INCLUDES += -I. -I$(ERESSEA)/eressea/old
|
INCLUDES += -I. -I$(ERESSEA)/eressea/old
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MKFILES = $(wildcard $(USER).mk $(OSTYPE).mk $(HOSTTYPE).mk $(ARCH).mk)
|
|
||||||
ifeq ($(MKFILES), )
|
|
||||||
else
|
|
||||||
include $(MKFILES)
|
|
||||||
endif
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* 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
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -962,6 +962,7 @@ int forbiddenid(int id);
|
||||||
int newcontainerid(void);
|
int newcontainerid(void);
|
||||||
|
|
||||||
char *getstrtoken(void);
|
char *getstrtoken(void);
|
||||||
|
char *igetstrtoken(const char *s);
|
||||||
param_t findparam(const char *s);
|
param_t findparam(const char *s);
|
||||||
param_t igetparam(const char *s);
|
param_t igetparam(const char *s);
|
||||||
param_t getparam(void);
|
param_t getparam(void);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue