# HG changeset patch # User tuomov # Date 956175477 -7200 # Node ID f73065173121de169182d44b3e21b28b24f5b511 # Parent f878a9ffa3e01224a230208c9d988c0d11bb41cc trunk: changeset 9 Added rules.mk system.mk diff -r f878a9ffa3e0 -r f73065173121 rules.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rules.mk Wed Apr 19 22:17:57 2000 +0200 @@ -0,0 +1,76 @@ +## +## Some make rules +## + +DEPEND_FILE=.depend + +###################################### + +ifdef SUBDIRS + +all: subdirs $(TARGETS) + +clean: subdirs-clean _clean + +realclean: subdirs-realclean _realclean + +depend: subdirs-depend _depend + +else + +all: $(TARGETS) + +clean: _clean + +realclean: _realclean + +depend: _depend + +endif + +ifdef INSTALL_SUBDIRS + +install: subdirs-install _install + +else + +install: _install + +endif + +###################################### + +.c.o: + $(CC) $(CC_FLAGS) -c $< -o $@ + +_clean: + rm -f core $(OBJS) $(DEPEND_FILE) + +_realclean: _clean + rm -f $(TARGETS) + +_depend: + $(CC) -M $(CC_FLAGS) *.c > $(DEPEND_FILE) + +###################################### + +subdirs: + set -e; for i in $$(SUBDIRS); do $(MAKE) -C $$i; done + +subdirs-depend: + set -e; for i in $$(SUBDIRS); do $(MAKE) -C $$i depend; done + +subdirs-clean: + set -e; for i in $$(SUBDIRS); do $(MAKE) -C $$i clean; done + +subdirs-realclean: + set -e; for i in $$(SUBDIRS); do $(MAKE) -C $$i realclean; done + +subdirs-install: + set -e; for i in $$(INSTALL_SUBDIRS); do $(MAKE) -C $$i install; done + +###################################### + +ifeq ($(DEPEND_FILE),$(wildcard $(DEPEND_FILE))) +include $(DEPEND_FILE) +endif diff -r f878a9ffa3e0 -r f73065173121 system.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/system.mk Wed Apr 19 22:17:57 2000 +0200 @@ -0,0 +1,70 @@ +## +## System settings +## + + +## +## Installation directory prefix +## + +PREFIX=/usr/local + +#INCLUDES += -I$(PREFIX)/include +#LIBS += -L$(PREFIX)/lib + + +## +## X libraries, includes and options +## + +X11_PREFIX=/usr/X11R6 + +# SunOS/Solaris +#X11_PREFIX=/usr/openwin + +X11_LIBS=$(X11_PREFIX)/lib +X11_INCLUDES=$(X11_PREFIX)/include +X11_DEFINES= + + +## +## C compiler +## + +CC=gcc + +ANSI_SOURCE=-ansi +BSD_SOURCE=-ansi -D_BSD_SOURCE +XOPENEXT_SOURCE=-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED + +# Same as '-Wall -pedantic-errors' without '-Wunused' as callbacks often +# have unused variables. +WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ + -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized \ + -Wparentheses -pedantic-errors + +CC_FLAGS=-g -O2 $(WARN) $(DEFINES) $(INCLUDES) +LINK_FLAGS=-g $(LIBS) + + +## +## AR +## + +AR=ar +AR_FLAGS=crs + + +## +## Install & strip +## + +INSTALL=install -c +# bsdinst or bsdinst.sh should do the job under IRIX. +#INSTALL=bsdinst -c + +BIN_MODE=755 +DATA_MODE=664 + +STRIP=strip +