diff --git a/binconst.mk b/binconst.mk index 9fbe435..df0c76e 100644 --- a/binconst.mk +++ b/binconst.mk @@ -2,7 +2,7 @@ # Compilation constants for utilities (directories ./bin, ./sbin, # ./usr.bin, ./usr.sbin). These are not used when building the libraries. # -# $Id: binconst.mk,v 1.4 1998/01/24 07:35:15 taubert Exp $ +# $Id: binconst.mk,v 1.5 1998/02/09 08:43:44 taubert Exp $ # # Devin Reade, 1997. # @@ -10,7 +10,7 @@ DEFINES += CFLAGS += -w LDFLAGS += -LDLIBS += $(LDADD:s/-l/-l:usr:lib:lib/) +LDLIBS += $(LDADD:s,-l,-l/usr/lib/lib,) # WARNING: You *must* use descu v1.0.4 or later for these builds. DESCU = /usr/sbin/descu @@ -23,18 +23,13 @@ DESC_DIR = $(RELEASE_DIR)/usr/lib DESC_SRC = $(DESC_DIR)/describe.src # If no source files were defined, use program name -.IF $(SRCS) == $(NULL) - SRCS = $(PROG).c -.END +SRCS *= $(PROG).c # If no main file was defined, use program name -.IF $(MAIN) == $(NULL) - MAIN = $(PROG) -.END +MAIN *= $(PROG) # Define DESC if it's not already done. -.IF $(DESC) == $(NULL) - DESC = $(PROG).desc -.END +DESC *= $(PROG).desc -OBJS = $(SRCS:s/.c/.o/:f) +# Objects are source file names with .c changed to .o +OBJS += $(SRCS:s/.c/.o/:f) diff --git a/binrules.mk b/binrules.mk index b1ebcb8..fd9d9b4 100644 --- a/binrules.mk +++ b/binrules.mk @@ -2,35 +2,40 @@ # Standard compilation rules for utilities (directories ./bin, ./sbin, # ./usr.bin, ./usr.sbin). These are not used when building the libraries. # -# $Id: binrules.mk,v 1.3 1997/11/01 19:10:37 gdr Exp $ +# $Id: binrules.mk,v 1.4 1998/02/09 08:43:46 taubert Exp $ # # Devin Reade, Dave Tribby, 1997. # # Default target, "build," generates the program file -build: $(PROG) +build: $(OBJ_DIR) $(OBJ_DIR)$(PROG) + +# create the object directory hierarchy if necessary +$(OBJ_DIR): + $(INSTALL) -d $(OBJ_DIR) # Create the main program file with a ".root" and set the stack size. # Include standard occ options # -a0: use .o suffix for object file # -c: don't link after compiling $(MAIN).o: $(MAIN).c - $(CC) $(CFLAGS:s/ -r / /) -a0 -c $(MAIN).c + $(CC) -o $@ $(CFLAGS:s/ -r / /) -a0 -c $(MAIN).c # Program depends upon all the objects. Add the version resource. -$(PROG): $(OBJS) $(PROG).r - $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LDLIBS) - $(CATREZ) -d $@ $(PROG).r +$(OBJ_DIR)$(PROG): $(OBJS) + $(CC) -o $@ $(LDFLAGS) $< $(LDLIBS) + $(CATREZ) -d $@ $(OBJ_DIR)$(PROG).r +$(OBJ_DIR)$(PROG): $(PROG).r # Remove intermediate files. If we don't put shell meta characters in # here, then dmake doesn't have to start up a subshell and can instead # exec the line directly clean: - -$(RM) -f $(OBJS) - -$(RM) -f $(MAIN).root - -$(RM) -f $(PROG).r + -$(RM) -f $(OBJ_DIR){$(OBJS)} + -$(RM) -f $(OBJ_DIR)$(MAIN).root + -$(RM) -f $(OBJ_DIR)$(PROG).r -$(RM) -f $(PROG).rej # Remove intermediate files and program file clobber: clean - -$(RM) $(PROG) + -$(RM) $(OBJ_DIR)$(PROG) diff --git a/kern/drivers/Makefile b/kern/drivers/Makefile index 9fc2f42..e3d959f 100644 --- a/kern/drivers/Makefile +++ b/kern/drivers/Makefile @@ -1,24 +1,22 @@ -# $Id: Makefile,v 1.1 1998/02/02 08:17:50 taubert Exp $ +# $Id: Makefile,v 1.2 1998/02/09 08:43:52 taubert Exp $ .INCLUDE: /src/gno/paths.mk -all: modem printer null +all: $(OBJ_DIR)modem $(OBJ_DIR)printer $(OBJ_DIR)null -modem: port.o msccf.o - $(LD) $(LDFLAGS) -l libsim -o $@ $< +$(OBJ_DIR)modem: port.o msccf.o + $(LD) $(LDFLAGS) -l /usr/lib/libsim -o $@ $< chtyp -t 187 -a 32257 $@ -modem: libsim -printer: port.o psccf.o - $(LD) $(LDFLAGS) -l libsim -o $@ $< +$(OBJ_DIR)printer: port.o psccf.o + $(LD) $(LDFLAGS) -l /usr/lib/libsim -o $@ $< chtyp -t 187 -a 32257 $@ -printer: libsim -null: null.o +$(OBJ_DIR)null: null.o $(LD) $(LDFLAGS) -o $@ $< chtyp -t 187 -a 32257 $@ -console: console.o inout.o box.root conpatch.o +$(OBJ_DIR)console: console.o inout.o box.root conpatch.o $(LD) $(LDFLAGS) -o $@ $< chtyp -t 187 -a 32257 $@ diff --git a/kern/gno/Makefile b/kern/gno/Makefile index b8b3e62..a35bab7 100644 --- a/kern/gno/Makefile +++ b/kern/gno/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.1 1998/02/02 08:18:19 taubert Exp $ +# $Id: Makefile,v 1.2 1998/02/09 08:43:55 taubert Exp $ .INCLUDE: /src/gno/paths.mk @@ -12,11 +12,16 @@ OBJS= main.o patch.o kern.o sys.o signal.o ctool.o sem.o \ CFLAGS+=-DKERNEL .SOURCE: ../drivers -$(PROG): $(OBJS) +$(OBJ_DIR)$(PROG): $(OBJS) gsh -c ${mktmp prefix 13 /lang/orca/libraries; $(LD) $(LDFLAGS) -o $@ $<} compile +w $(PROG).rez keep=$@ chtyp -t s16 $@ -$(PROG): $(PROG).rez + $(CP) $@ /ren/gno.new/kern.new +$(OBJ_DIR)$(PROG): $(PROG).rez + +#%.o : %.c +# $(CC) $(CFLAGS) -c $< -o $@ +# @gsh -c ${mktmp cd $(OBJ_DIR); nameobj -p $@} # dependencies diff --git a/lib/const.mk b/lib/const.mk index 4c70cfa..b465a6e 100644 --- a/lib/const.mk +++ b/lib/const.mk @@ -6,7 +6,7 @@ # # Devin Reade, 1997 # -# $Id: const.mk,v 1.5 1998/02/08 03:47:15 gdr-ftp Exp $ +# $Id: const.mk,v 1.6 1998/02/09 08:43:58 taubert Exp $ # # It is critical that 13/orcacdefs/defaults.h is set up correctly, # including #defines for __appleiigs__ and __GNO__. For the purpose @@ -16,7 +16,7 @@ DEFINES += INCLUDES += -ASFLAGS += -r -c +ASFLAGS += -r CFLAGS += -r -w $(DEFINES) $(INCLUDES) LDFLAGS += INSTALL = /usr/bin/install @@ -33,6 +33,6 @@ RELUSRLIB = $(RELEASE_DIR)$(USRLIBDIR) MAKELIB = 17/makelib.apw MAKELIBFLAGS = -w -r -p -# This is the name of the library we're building. We define LIBPFX if -# it's not in the current directory. -LIBTARGET = $(LIBPFX)lib$(LIB) +# This is the name of the library we're building. +LIBPFX *= $(OBJ_DIR) +LIBTARGET = $(LIBPFX)lib$(LIB) diff --git a/lib/lib.mk b/lib/lib.mk index 88d93a5..19ca616 100644 --- a/lib/lib.mk +++ b/lib/lib.mk @@ -1,12 +1,12 @@ # -# $Id: lib.mk,v 1.2 1998/02/08 03:47:17 gdr-ftp Exp $ +# $Id: lib.mk,v 1.3 1998/02/09 08:44:01 taubert Exp $ # .INCLUDE: /src/gno/paths.mk .INCLUDE: /src/gno/lib/const.mk # Objects are source file names with .c changed to .o -OBJS= $(SRCS:s/.c/.o/:f) +OBJS += $(SRCS:s/.c/.o/:f) # # Check for user-specified compile/load options @@ -18,19 +18,25 @@ OBJS= $(SRCS:s/.c/.o/:f) .END # Was special optimizing requested? -.IF $(OPTIMIZE) == $(NULL) - OPTIMIZE= 78 -.END +OPTIMIZE*= 78 # Compile and load flags passed to occ -CFLAGS+= -O$(OPTIMIZE) +CFLAGS += -O$(OPTIMIZE) -# default target -build: $(LIBTARGET) +# build is the default target +build: $(OBJ_DIR) $(LIBTARGET) + +# create the object directory hierarchy if necessary +$(OBJ_DIR): + $(INSTALL) -d $(OBJ_DIR) # Update library with out of date object files -$(LIBTARGET): $(OBJS) +$(LIBTARGET) .PRECIOUS: $(OBJS) $(MAKELIB) $(MAKELIBFLAGS) -l $@ $^ +# Use "dmake force; dmake build" to update all the object files in a library +force: $(OBJS) + touch $< + .INCLUDE: /src/gno/lib/librelease.mk diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 6e9683a..bf8a399 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -10,26 +10,17 @@ # # Devin Reade, 1997. # -# $Id: Makefile,v 1.7 1998/02/08 03:47:22 gdr-ftp Exp $ +# $Id: Makefile,v 1.8 1998/02/09 08:44:06 taubert Exp $ # -LIB = c +LIB= c +# assert.a must be copied from $(ORCA_SRC)/ORCALib/obj into $(OBJ_DIR) +OBJS= assert.a -.INCLUDE: ../../paths.mk -.INCLUDE: ../const.mk +# This library goes into /lib. +USE_SLASH_LIB= true -USE_SLASH_LIB = true # This library goes into /lib. - -ORCALIB_OBJ = \ - $(ORCA_SRC)/orcalib/obj/assert.a - -libc: $(ORCALIB_OBJ) - $(MAKELIB) $(MAKELIBFLAGS) -l $@ $^ - -$(ORCALIB_OBJ):; true - -.INCLUDE: ../librelease.mk +.INCLUDE: /src/gno/lib/lib.mk $(LIBTARGET):: lib$(LIB).r - $(CATREZ) -d $@ lib$(LIB).r - + $(CATREZ) -d $@ $< diff --git a/lib/libc/gen/Makefile b/lib/libc/gen/Makefile index 8b8909f..110bf0d 100644 --- a/lib/libc/gen/Makefile +++ b/lib/libc/gen/Makefile @@ -1,25 +1,17 @@ # # Makefile for libc/gen. # -# $Id: Makefile,v 1.7 1998/02/09 08:25:39 taubert Exp $ +# $Id: Makefile,v 1.8 1998/02/09 08:44:12 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJ_ASM=setjmp.o syslog.o +OBJ_C= basename.o bmem.o compat.o dirent.o err.o fnmatch.o fts.o \ + getcwd.o getgrent.o getpass.o getpwent.o getttyent.o hostname.o \ + oldlog.o popen.o psignal.o pwcache.o scandir.o siglist.o sleep.o \ + tty.o utime.o -OBJ_ASM = setjmp.o syslog.o -OBJ_C = basename.o bmem.o compat.o dirent.o err.o fnmatch.o fts.o \ - getcwd.o getgrent.o getpass.o getpwent.o getttyent.o hostname.o \ - oldlog.o popen.o psignal.o pwcache.o scandir.o siglist.o sleep.o \ - tty.o utime.o +OBJS= $(OBJ_ASM) $(OBJ_C) -OBJS = $(OBJ_ASM) $(OBJ_C) - -CFLAGS += -O78 - -build .PHONY: ../libc -obj: $(OBJS) -asm: $(OBJ_ASM) -c: $(OBJ_C) - -.INCLUDE: ../rules.mk +.INCLUDE: /src/gno/lib/lib.mk diff --git a/lib/libc/gno/Makefile b/lib/libc/gno/Makefile index 4ebb76c..fcbb743 100644 --- a/lib/libc/gno/Makefile +++ b/lib/libc/gno/Makefile @@ -1,26 +1,19 @@ # # gno/libc/gno/Makefile # -# Devin Reade, 1996 -# -# $Id: Makefile,v 1.5 1997/12/21 20:11:17 gdr Exp $ +# $Id: Makefile,v 1.6 1998/02/09 08:44:20 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk - -OBJ_ASM = gnocmd.o parsearg.o stack.o -OBJ_C = gnomisc.o gsstring.o map.o stack2.o -OBJS = $(OBJ_ASM) $(OBJ_C) - -CFLAGS += -O78 +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJ_ASM=gnocmd.o parsearg.o stack.o +OBJ_C= gnomisc.o gsstring.o map.o stack2.o +OBJS= $(OBJ_ASM) $(OBJ_C) MACROS_ORCA = $(ORCA_DIST)/OrcaInclude MACRO_FILES = $(MACROS_ORCA)/m16.tools $(MACROS_ORCA)/m16.orca -build .PHONY: ../libc - -obj: $(OBJS) +.INCLUDE: /src/gno/lib/lib.mk stack.mac: macgen -p stack.asm $@ $(MACRO_FILES) @@ -28,8 +21,6 @@ stack.mac: clean clobber: $(RM) -f $(OBJS) stack.mac -.INCLUDE: ../rules.mk - gnocmd.o:: gnocmd.mac parsearg.o:: parsearg.mac stack.o:: stack.mac diff --git a/lib/libc/locale/Makefile b/lib/libc/locale/Makefile index 8db7d70..9f525f7 100644 --- a/lib/libc/locale/Makefile +++ b/lib/libc/locale/Makefile @@ -1,18 +1,11 @@ # # gno/lib/libc/locale/Makefile # -# Devin Reade, 1997 -# -# $Id: Makefile,v 1.4 1997/10/03 04:44:24 gdr Exp $ +# $Id: Makefile,v 1.5 1998/02/09 08:44:28 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJS= table.o -OBJS = table.o -CFLAGS += -O78 - -build .PHONY: ../libc -obj: $(OBJS) - -.INCLUDE: ../rules.mk +.INCLUDE: /src/gno/lib/lib.mk diff --git a/lib/libc/regex/Makefile b/lib/libc/regex/Makefile index e4af528..8b6c2ec 100644 --- a/lib/libc/regex/Makefile +++ b/lib/libc/regex/Makefile @@ -1,22 +1,16 @@ # -# $Id: Makefile,v 1.2 1997/11/17 04:13:07 gdr Exp $ -# -# Devin Reade, October 1997. +# $Id: Makefile,v 1.3 1998/02/09 08:44:37 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk - -OBJS = regcomp.o regerror.o regexec.o regfree.o +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJS= regcomp.o regerror.o regexec.o regfree.o # I've not bothered to determine what POSIX_MISTAKE means, but 4.4BSD # uses it. CFLAGS += -v -r -DPOSIX_MISTAKE -build .PHONY: ../libc -obj: $(OBJS) - -.INCLUDE: ../rules.mk +.INCLUDE: /src/gno/lib/lib.mk regcomp.o:: cclass.h cname.h regex2.h utils.h regerror.o:: utils.h diff --git a/lib/libc/stdio/Makefile b/lib/libc/stdio/Makefile index 3a5b31f..5ddc554 100644 --- a/lib/libc/stdio/Makefile +++ b/lib/libc/stdio/Makefile @@ -1,15 +1,12 @@ # # gno/lib/libc/stdio/Makefile # -# Devin Reade, 1997 -# -# $Id: Makefile,v 1.9 1998/01/26 00:44:25 gdr-ftp Exp $ +# $Id: Makefile,v 1.10 1998/02/09 08:44:46 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk - -OBJS = clrerr.o fclose.o fdopen.o feof.o ferror.o fflush.o fgetc.o \ +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJS= clrerr.o fclose.o fdopen.o feof.o ferror.o fflush.o fgetc.o \ fgetln.o fgetpos.o fgets.o fileno.o findfp.o flags.o fopen.o \ fprintf.o fpurge.o fputc.o fputs.o fread.o freopen.o fscanf.o \ fseek.o fsetpos.o ftell.o funopen.o fvwrite.o fwalk.o fwrite.o \ @@ -20,11 +17,6 @@ OBJS = clrerr.o fclose.o fdopen.o feof.o ferror.o fflush.o fgetc.o \ vprintf.o vscanf.o vsnprintf.o vsprintf.o vsscanf.o wbuf.o wsetup.o \ vfprintf1.o vfprintf2.o -CFLAGS += -O78 - -build .PHONY: ../libc -obj: $(OBJS) - # # There is a problem with ORCA/C v2.1.1b2 (and likely earlier versions) # that keeps it from compiling vfprintf.c. Instead the machine crashes. @@ -38,8 +30,10 @@ obj: $(OBJS) JINCL = -I/usr/include -I/lang/orca/libraries/orcacdefs JDEFS = -D__ORCAC__ -D__appleiigs__ -D__GNO__ -DSPLIT_FILE_2 +.INCLUDE: /src/gno/lib/lib.mk + junk.c: vfprintf.c - gsh -c ${mktmp cpp $(JINCL) $(JDEFS) $< > $@} + gsh -c ${mktmp cpp $(JINCL) $(JDEFS) $< > 14/junk.c; $(CP) 14/junk.c $@} vfprintf1.o: vfprintf.c $(CC) -c -o $@ $(CFLAGS) -DSPLIT_FILE_1 $< @@ -47,8 +41,6 @@ vfprintf1.o: vfprintf.c vfprintf2.o: junk.c $(CC) -c -o $@ $(CFLAGS) -DSPLIT_FILE_2 $< -.INCLUDE: ../rules.mk - # Additional dependancies: fclose.o:: local.h fdopen.o:: local.h diff --git a/lib/libc/stdlib/Makefile b/lib/libc/stdlib/Makefile index 534a882..1a73237 100644 --- a/lib/libc/stdlib/Makefile +++ b/lib/libc/stdlib/Makefile @@ -1,22 +1,13 @@ # # gno/lib/libc/stdlib/Makefile # -# Devin Reade, 1997 -# -# $Id: Makefile,v 1.4 1997/10/03 04:44:25 gdr Exp $ +# $Id: Makefile,v 1.5 1998/02/09 08:44:55 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJS= cvt.o environ.o fpspecnum.o getopt.o getsubopt.o -OBJS = cvt.o environ.o fpspecnum.o getopt.o getsubopt.o - -CFLAGS += -O78 - -build .PHONY: ../libc - -obj: $(OBJS) - -.INCLUDE: ../rules.mk +.INCLUDE: /src/gno/lib/lib.mk fpspecnum.o:: fpspecnum.mac diff --git a/lib/libc/stdtime/Makefile b/lib/libc/stdtime/Makefile index 4a55f7c..959679f 100644 --- a/lib/libc/stdtime/Makefile +++ b/lib/libc/stdtime/Makefile @@ -1,23 +1,19 @@ # # Makefile for libc/stdtime. # -# $Id: Makefile,v 1.2 1997/10/03 04:44:25 gdr Exp $ +# $Id: Makefile,v 1.3 1998/02/09 08:45:04 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk - -OBJS = asctime.o difftime.o localtime.o strftime.o +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJS= asctime.o difftime.o localtime.o strftime.o CFLAGS += -v default: @echo do not use this directory yet -build .PHONY: ../libc -obj: $(OBJS) - -.INCLUDE: ../rules.mk +.INCLUDE: /src/gno/lib/lib.mk asctime.o:: private.h difftime.o:: private.h diff --git a/lib/libc/string/Makefile b/lib/libc/string/Makefile index 7eb4a27..59dddf3 100644 --- a/lib/libc/string/Makefile +++ b/lib/libc/string/Makefile @@ -1,18 +1,11 @@ # # gno/lib/libc/string/Makefile # -# Devin Reade, 1997 -# -# $Id: Makefile,v 1.4 1997/10/03 04:44:26 gdr Exp $ +# $Id: Makefile,v 1.5 1998/02/09 08:45:13 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJS= case.o str.o strerror.o -OBJS = case.o str.o strerror.o -CFLAGS += -O78 - -build .PHONY: ../libc -obj: $(OBJS) - -.INCLUDE: ../rules.mk +.INCLUDE: /src/gno/lib/lib.mk diff --git a/lib/libc/sys/Makefile b/lib/libc/sys/Makefile index fc91853..45d79b3 100644 --- a/lib/libc/sys/Makefile +++ b/lib/libc/sys/Makefile @@ -1,20 +1,13 @@ # # gno/lib/libc/sys/Makefile # -# Devin Reade, 1997. -# -# $Id: Makefile,v 1.4 1997/10/03 04:44:26 gdr Exp $ +# $Id: Makefile,v 1.5 1998/02/09 08:45:21 taubert Exp $ # -.INCLUDE: ../../../paths.mk -.INCLUDE: ../../const.mk +LIB= c +LIBPFX= $(OBJ_DIR)../ +OBJS= exec.o syscall.o trap.o -OBJS = exec.o syscall.o trap.o -CFLAGS += -O78 - -build .PHONY: ../libc -obj: $(OBJS) - -.INCLUDE: ../rules.mk +.INCLUDE: /src/gno/lib/lib.mk trap.o:: trap.mac diff --git a/paths.mk b/paths.mk index 7cef2d7..8bf1aed 100644 --- a/paths.mk +++ b/paths.mk @@ -7,15 +7,28 @@ # # Devin Reade, 1997 # -# $Id: paths.mk,v 1.4 1998/01/26 00:44:20 gdr-ftp Exp $ +# $Id: paths.mk,v 1.5 1998/02/09 08:43:47 taubert Exp $ # # SRC_DIR is the top-level GNO source distribution directory (containing # $(SRC_DIR)/gno, $(SRC_DIR)/gno/lib, and so forth). It also corresponds # to the top level of the CVS repository. # I recommend using /src and defining it in /etc/namespace. +# +# OBJ_DIR can be used to store the resulting object and binary files on +# a separate partition from the source. This is very handy when the +# source is stored on an AppleShare volume. If you don't need this +# feature, you can either define /obj in /etc/namespace to be the same +# as /src, or simply comment out the OBJ_DIR line here. SRC_DIR = /src +CWD = $(PWD:s,:,/,g) +OBJ_DIR = /obj$(CWD:s,${SRC_DIR},,) + +.SOURCE.a : $(OBJ_DIR) +.SOURCE.o : $(OBJ_DIR) +.SOURCE.r : $(OBJ_DIR) +.SOURCE.root : $(OBJ_DIR) # RELEASE_DIR is the directory into which we will put the created # distribution files. diff --git a/prog.mk b/prog.mk index 4a54df5..5543cfc 100644 --- a/prog.mk +++ b/prog.mk @@ -1,7 +1,7 @@ # # prog.mk version 1.1.0 (August 31, 1997) # -# $Id: prog.mk,v 1.4 1997/10/30 04:26:58 gdr Exp $ +# $Id: prog.mk,v 1.5 1998/02/09 08:43:49 taubert Exp $ # # This makefile is intended for use with dmake(1) and occ(1) on Apple IIGS @@ -37,16 +37,9 @@ # stack size to 4096, and to set the "__STACK_CHECK__" macro: # dmake DEBUG=25 STACK=4096 DEFINES=-D__STACK_CHECK__ -# -# Created by Dave Tribby, July 1997 -# - .INCLUDE: /src/gno/paths.mk .INCLUDE: /src/gno/binconst.mk -# Objects are source file names with .c changed to .o -OBJS=$(SRCS:s/.c/.o/:f) - # # Check for user-specified compile/load options # @@ -57,14 +50,10 @@ OBJS=$(SRCS:s/.c/.o/:f) .END # Was special optimizing requested? -.IF $(OPTIMIZE) == $(NULL) - OPTIMIZE = 78 -.END +OPTIMIZE*= 78 # Use stack size of 768 bytes if STACK macro isn't already defined -.IF $(STACK) == $(NULL) - STACK = 1024 -.END +STACK *= 1024 # Compile and load flags passed to occ # -r: don't create .root file (used on all but main file) @@ -72,12 +61,8 @@ CFLAGS += -r -O$(OPTIMIZE) $(DEFINES) -s$(STACK) # If installation directories were not set, use defaults -.IF $(BINDIR) == $(NULL) - BINDIR = /bin -.END -.IF $(MANDIR) == $(NULL) - MANDIR = /usr/man -.END +BINDIR *= /bin +MANDIR *= /usr/man RELBIN = $(RELEASE_DIR)$(BINDIR) RELMAN = $(RELEASE_DIR)$(MANDIR)