$(TOPDIR), make: Initial commit

After making most modules independent from the Hamlet tree, place
Makefiles in a central location for more centralized control over the
build process.
This commit is contained in:
Jan Lindemann 2001-07-06 13:12:14 +00:00 committed by Jan Lindemann
commit 46c67d77fc
11 changed files with 206 additions and 0 deletions

43
make/defs-orig.mk Normal file
View file

@ -0,0 +1,43 @@
# generic utility modules
# (c) 2001 jannet it services
# contact@jannet.de
# $Id$
VERSION = $(shell cat $(TOPDIR)/VERSION)
PROJECT = mod
MOD = mod
LIBNAME = $(MOD)
OBJ = $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(wildcard *.c *.cc)))
SHOBJS = $(patsubst %.cc,lib%.so$(patsubst %.c,lib%.so,$(wildcard *.c *.cc)))
SHSCRIPTS = $(patsubst %.sh.tmpl,%.sh,$(wildcard *.sh.tmpl))
SCRIPTS = $(patsubst %.tmpl,%,$(wildcard *.tmpl))
INST_HDRS = $(patsubst %.h,$(TOPDIR)/include/%.h,$(wildcard *.h))
PREREQ_DONE = $(patsubst %,$(TOPDIR)/%/all.done,$(LOCAL_PREREQ))
TEXTCLEAN = $(wildcard *~ .*~ .*.swp \#*\#)
INCLUDE = -I$(TOPDIR)/include
LIBDIR = $(TOPDIR)/lib
LIB = $(LIBDIR)/lib$(LIBNAME).a
MEMBERS = $(LIB)($(OBJ))
PREFIX = ../
#MEMWATCH = -DMEMWATCH -DMW_STDIO
#YAMD = yamd-
#CFLAGS = -DNDEBUG -O2 -g $(INCLUDE) $(LOCAL_CFLAGS) #production
CFLAGS = -Wall -D_DEBUG_ $(MEMWATCH) -g $(INCLUDE) $(LOCAL_CFLAGS)
CPPFLAGS = -Wall -D_DEBUG_ $(MEMWATCH) -g $(INCLUDE) $(LOCAL_CPPFLAGS)
LDFFTW = -lrfftw -lfftw -lm
#LDAUDIO = -laudiofile
LDFLAGS = -L$(LIBDIR) -l$(LIBNAME) -lg++
LDREST = -ldl $(LDAUDIO) $(LDFFTW) $(LOCAL_LDFLAGS)
CC = $(YAMD)gcc
CPP = c++
RM = rm
AR = ar
INSTALL = install
define make_subdirs
set -e; for D in $(SUBDIRS) ; do make -C $$D ; done
endef
define make_subdirs_target
set -e; for D in $(SUBDIRS) ; do make -C $$D $@; done
endef