binconst.mk:

- changed definition of OBJS to remove the full pathnames
	  and to add to previous values of OBJS rather than to act
	  as a default value

binrules.mk:
	- backed out all v1.5 changes except for using $(MAINSRC)
	  vice $(MAIN).c
	- added a recipe for building ProDOS-renamed object files

paths.mk:
	- backed out v1.6 changes
	- added a macro, PRODOS_OBJS.  If this is set to "true", then
	  ProDOS-compliant file names will be used for object files.
This commit is contained in:
gdr-ftp 1998-02-17 00:26:27 +00:00
parent d124889572
commit 22fa70695a
3 changed files with 29 additions and 14 deletions

View File

@ -2,7 +2,7 @@
# Compilation constants for utilities (directories ./bin, ./sbin, # Compilation constants for utilities (directories ./bin, ./sbin,
# ./usr.bin, ./usr.sbin). These are not used when building the libraries. # ./usr.bin, ./usr.sbin). These are not used when building the libraries.
# #
# $Id: binconst.mk,v 1.6 1998/02/15 19:43:57 gdr-ftp Exp $ # $Id: binconst.mk,v 1.7 1998/02/17 00:26:24 gdr-ftp Exp $
# #
# Devin Reade, 1997. # Devin Reade, 1997.
# #
@ -41,6 +41,11 @@ DESC *= $(PROG).desc
MAN1SFX = 1G MAN1SFX = 1G
.END .END
# Define all object files as being in the /obj hierarchy. # Objects are source file names with [.c|.asm] changed to .o
OBJS *= $(OBJ_DIR){$(SRCS:b)}.o # If we're keeping object files on a ProDOS partition, change the
# '_' characters in file names to '.'
.IF $(PRODOS_OBJS) == true
OBJS += {$(SRCS:b:s/_/./g)}.o
.ELSE
OBJS += {$(SRCS:b)}.o
.END

View File

@ -2,7 +2,7 @@
# Standard compilation rules for utilities (directories ./bin, ./sbin, # Standard compilation rules for utilities (directories ./bin, ./sbin,
# ./usr.bin, ./usr.sbin). These are not used when building the libraries. # ./usr.bin, ./usr.sbin). These are not used when building the libraries.
# #
# $Id: binrules.mk,v 1.5 1998/02/15 19:44:00 gdr-ftp Exp $ # $Id: binrules.mk,v 1.6 1998/02/17 00:26:25 gdr-ftp Exp $
# #
# Devin Reade, Dave Tribby, 1997. # Devin Reade, Dave Tribby, 1997.
# #
@ -18,16 +18,15 @@ $(OBJ_DIR):
# Include standard occ options # Include standard occ options
# -a0: use .o suffix for object file # -a0: use .o suffix for object file
# -c: don't link after compiling # -c: don't link after compiling
$(OBJ_DIR)$(MAIN).o: $(MAINSRC) $(MAIN).o: $(MAINSRC)
$(CC) -o $@ $(CFLAGS:s/ -r / /) -a0 -c $(MAINSRC) $(CC) -o $@ $(CFLAGS:s/ -r / /) -a0 -c $(MAINSRC)
# Program depends upon all the objects. Add the version resource. # Program depends upon all the objects. Add the version resource.
$(OBJ_DIR)$(PROG): $(OBJS) $(OBJ_DIR)$(PROG): $(OBJS)
$(CC) -o $@ $(LDFLAGS) $< $(LDLIBS) $(CC) -o $@ $(LDFLAGS) $< $(LDLIBS)
$(OBJ_DIR)$(PROG):: $(OBJ_DIR)$(PROG).r
$(CATREZ) -d $@ $(OBJ_DIR)$(PROG).r $(CATREZ) -d $@ $(OBJ_DIR)$(PROG).r
$(OBJ_DIR)$(PROG): $(PROG).r
# Remove intermediate files. If we don't put shell meta characters in # 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 # here, then dmake doesn't have to start up a subshell and can instead
# exec the line directly # exec the line directly
@ -41,7 +40,7 @@ clean:
clobber: clean clobber: clean
-$(RM) $(OBJ_DIR)$(PROG) -$(RM) $(OBJ_DIR)$(PROG)
# Default target for object files # Implicit rule to handle ProDOS-renamed object files
$(OBJ_DIR)%.o: %.c ; $(CC) -o $@ $(CFLAGS) -a0 -c $< %.o: %.O;
$(OBJ_DIR)%.o: %.asm ; $(AS) -o $@ $(ASFLAGS) -a0 -c $< %.O .PRECIOUS : $$(@:b:s/./_/g).c
$(OBJ_DIR)%.r: %.rez; $(REZ) -o $@ $(REZFLAGS) $< $(CC) -o $(OBJ_DIR)$*.o $(CFLAGS) -c $<

View File

@ -7,9 +7,15 @@
# #
# Devin Reade, 1997 # Devin Reade, 1997
# #
# $Id: paths.mk,v 1.6 1998/02/15 19:44:01 gdr-ftp Exp $ # $Id: paths.mk,v 1.7 1998/02/17 00:26:27 gdr-ftp Exp $
# #
# This one isn't really a path, but it affects the creation of path
# names. If PRODOS_OBJS is set to "true" (minus the quotes), then the
# created object files will follow ProDOS naming conventions.
PRODOS_OBJS = true
# SRC_DIR is the top-level GNO source distribution directory (containing # SRC_DIR is the top-level GNO source distribution directory (containing
# $(SRC_DIR)/gno, $(SRC_DIR)/gno/lib, and so forth). It also corresponds # $(SRC_DIR)/gno, $(SRC_DIR)/gno/lib, and so forth). It also corresponds
# to the top level of the CVS repository. # to the top level of the CVS repository.
@ -25,6 +31,11 @@ SRC_DIR = /src
CWD = $(PWD:s,:,/,g) CWD = $(PWD:s,:,/,g)
OBJ_DIR = /obj$(CWD:s,${SRC_DIR},,) 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 # RELEASE_DIR is the directory into which we will put the created
# distribution files. # distribution files.
# I recommend using /dist and defining it in /etc/namespace. # I recommend using /dist and defining it in /etc/namespace.