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 \
|
||||
# tools \
|
||||
|
||||
ifeq ($(HOST),amber)
|
||||
ifeq ($(USER),eressea)
|
||||
include Makefile.corwin
|
||||
endif
|
||||
endif
|
||||
|
||||
include Makefile.include
|
||||
|
||||
|
||||
## more definitions
|
||||
|
|
|
@ -1,33 +1,43 @@
|
|||
## 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-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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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