# # Makefile # # Developed by Lubomir Host 'rajo' # Copyright (c) 2003 Platon SDG, http://platon.sk/ # Licensed under terms of GNU General Public License. # All rights reserved. # # Changelog: # 25/07/2003 - created # # $Platon: games/Makefile,v 1.1 2003/07/25 19:29:33 rajo Exp $ # Makefile for creating distribution of test package # Type 'make dist' for create tar-gziped archiv. PACKAGE = games VERSION = 1.0 unexport SUBDIRS unexport SUBDIR_OBJECTS unexport MAKEFILES unexport CONFIGURE_SCRIPTS export PACKAGE export VERSION # Directories {{{ srcdir = . top_srcdir = . distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) top_builddir = . # }}} Directories # Targets {{{ # if you have subdirectories with Makefiles, # add names of directories here SUBDIRS = 3do-view \ mines \ pexeso PROGRAM = # here add names of your source codes SOURCES = # name of objects and header files is created # _automaticaly_ from $(SOURCES) -- you don't need # change this OBJECTS = $(sort $(patsubst %.c,%.o,$(SOURCES))) include_HEADERS = $(sort $(patsubst %.c,%.h,$(SOURCES))) DEP_FILES = $(sort $(patsubst %.c,.deps/%.P,$(SOURCES))) DISTFILES = Makefile \ $(SOURCES) $(include_HEADERS) CONFIG_HEADER = $(top_builddir)/config.h # }}} Targets # Programs {{{ TAR = tar ZIP = zip ZIP_ENV = -r9 GZIP_ENV = --best CC = CPP = CXX = #DEBUG_FLAGS = -g -ggdb -DDEBUG CFLAGS = -O2 -Wall -Wshadow -pedantic $(DEBUG_FLAGS) CPPFLAGS = LDFLAGS = DEFS = INCLUDES = -I$(srcdir) -I$(top_builddir) LIBS = COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ # }}} Programs all: all-subdirs # # False targets. # .PHONY: dummy # # A rule to do nothing # dummy: clean: clean-subdirs -rm -f *.o core # # A rule to make subdirectories # subdir-list-all = $(sort $(patsubst %,_subdir_%,$(SUBDIRS))) all-subdirs: dummy $(subdir-list-all) ifdef SUBDIRS $(subdir-list-all) : dummy $(MAKE) -C $(patsubst _subdir_%,%,$@) svgalib endif # # A rule to make clean in subdirectories # subdir-list-clean = $(sort $(patsubst %,_subdir_clean_%,$(SUBDIRS))) clean-subdirs: dummy $(subdir-list-clean) ifdef SUBDIRS $(subdir-list-clean) : dummy $(MAKE) -C $(patsubst _subdir_clean_%,%,$@) clean endif # vim600: fdm=marker fdc=3