# Built one model of the libnix libraries - use # make CFLAGS="what you like" to built them. # # Combine # # CFLAGS=-Wall -O3 # # -fbaserel -DSMALL_DATA for small data model # -fbaserel32 for large baserel model # -m68020 for 68020 specific code # -m68060 for 68060 specific code # -m68881 for 68881 specific code # -DIXPATHS for Un*x path option # -DDEBUG_LIB build a library for debugging (not recommended) #### Start of system configuration section. #### srcdir = @srcdir@ VPATH = @srcdir@ CC = @CC@ CPP = @CPP@ AS = as RANLIB = @RANLIB@ AWK = @AWK@ #### End system configuration section #### CURDIR = $(shell pwd) MAKELIST=make -f $(CURDIR)/Makefile SUBDIRS=nixmain nix_main misc nix nix13 math stack stubs all: $(foreach f,$(SUBDIRS),$(CURDIR)/$(f)) for subdir in $(SUBDIRS); do \ ( cd $$subdir;make -f ../../sources/$$subdir/Makefile V="$(V)" \ CFLAGS="$(CFLAGS)" ); \ done $(foreach f,$(SUBDIRS),$(CURDIR)/$(f)): mkdir $@ libamiga: if [ ! -d amiga ] ; then mkdir amiga ; else true ; fi cd amiga;make -f $(CURDIR)/../sources/amiga/Makefile CFLAGS="$(CFLAGS)" filelists: -cd $(srcdir)/math; $(MAKELIST) SOURCEFILES="*/*" FLDIR=$(CURDIR)/math $(CURDIR)/math/filelist -cd $(srcdir)/stack; $(MAKELIST) SOURCEFILES="*.c" FLDIR=$(CURDIR)/stack $(CURDIR)/stack/filelist -cd $(srcdir)/nix; $(MAKELIST) SOURCEFILES="*/*" FLDIR=$(CURDIR)/nix $(CURDIR)/nix/filelist -cd $(srcdir)/nix13; $(MAKELIST) SOURCEFILES="*/*" FLDIR=$(CURDIR)/nix13 $(CURDIR)/nix13/filelist -cd $(srcdir)/stubs; make -f $(CURDIR)/Makefile STUBDIR=$(CURDIR)/stubs libbases/dos.c; \ $(MAKELIST) SOURCEFILES=" \ libbases/* misc/__DOSBase.c misc/__UtilityBase.c \ misc/__MathIeeeSingBasBase.c misc/__MathIeeeDoubBasBase.c \ misc/__MathIeeeSingTransBase.c misc/__MathIeeeDoubTransBase.c \ misc/__initlibraries.c misc/__flush_cache.c misc/__cpucheck.c \ libnames/* stubs/*" \ FLDIR=$(CURDIR)/stubs $(CURDIR)/stubs/filelist -cd $(srcdir)/amiga; $(MAKELIST) SOURCEFILES="*/*" FLDIR=$(CURDIR)/amiga $(CURDIR)/amiga/filelist $(FLDIR)/filelist: echo "#Computer generated partial Makefile-do not edit" >$(FLDIR)/filelist echo "OBJECTS= \\" >>$(FLDIR)/filelist ( for file in $(SOURCEFILES); do echo $$file; done ) | \ $(AWK) '{ if($$0 !~ /CVS/) { print substr($$0,1,length($$0)-2) ".o \\" } }' >>$(FLDIR)/filelist echo >>$(FLDIR)/filelist echo "SUBDIRS= \\" >>$(FLDIR)/filelist ls -d -F *|$(AWK) '/\// { if($$0 !~ /CVS/) { print substr($$0,1,length($$0)-1) " \\" } }' >>$(FLDIR)/filelist # build stubs for library base pointers libbases/dos.c: $(STUBDIR)/Makefile library.list -rm -f libbases/* libnames/* $(AWK) fname; \ print "#include " >fname; \ print "extern char __" sname "name[];" >fname; \ print "void *" $$1 "[2]={ 0l,__" sname "name };" >fname; \ print "ADD2LIB(" $$1 ");" >fname; \ fname="libnames/" sname ".c"; \ print "/* Machine-generated C-file- do not edit ! */" >fname; \ print "char __" sname "name[]=\"" $$2 "\";" >fname;}' clean: if [ -d nixmain ] ; then (cd nixmain; make -f ../../sources/nixmain/Makefile TARGET=clean clean) ; else true ; fi if [ -d nix_main ] ; then (cd nix_main; make -f ../../sources/nix_main/Makefile TARGET=clean clean) ; else true ; fi if [ -d misc ] ; then (cd misc; make -f ../../sources/misc/Makefile TARGET=clean clean) ; else true ; fi if [ -d math ] ; then (cd math; make -f ../../sources/math/Makefile TARGET=clean clean) ; else true ; fi if [ -d stack ] ; then (cd stack; make -f ../../sources/stack/Makefile TARGET=clean clean) ; else true ; fi if [ -d nix ] ; then (cd nix; make -f ../../sources/nix/Makefile TARGET=clean clean) ; else true ; fi if [ -d nix13 ] ; then (cd nix13; make -f ../../sources/nix13/Makefile TARGET=clean clean) ; else true ; fi if [ -d stubs ] ; then (cd stubs; make -f ../../sources/stubs/Makefile TARGET=clean clean) ; else true ; fi veryclean: -rm -rf *