- backed out v1.4 changes
	- replace .asm (as well as .c) suffixes with .o for OBJS definition
	- added a recipe for building ProDOS renamed object files
This commit is contained in:
gdr-ftp 1998-02-17 00:33:08 +00:00
parent 22fa70695a
commit caf78f9f1c

View File

@ -1,13 +1,18 @@
# #
# $Id: lib.mk,v 1.4 1998/02/15 19:18:20 gdr-ftp Exp $ # $Id: lib.mk,v 1.5 1998/02/17 00:33:08 gdr-ftp Exp $
# #
.INCLUDE: /src/gno/paths.mk .INCLUDE: /src/gno/paths.mk
.INCLUDE: /src/gno/lib/const.mk .INCLUDE: /src/gno/lib/const.mk
# Objects are source file names with [.c|.asm] changed to .o, and placed # Objects are source file names with [.c|.asm] changed to .o
# in the /obj hierarchy. # If we're keeping object files on a ProDOS partition, change the
OBJS *= $(OBJ_DIR){$(SRCS:b)}.o # '_' characters in file names to '.'
.IF $(PRODOS_OBJS) == true
OBJS += {$(SRCS:b:s/_/./g)}.o
.ELSE
OBJS += {$(SRCS:b)}.o
.END
# #
# Check for user-specified compile/load options # Check for user-specified compile/load options
@ -35,18 +40,19 @@ $(OBJ_DIR):
$(LIBTARGET) .PRECIOUS: $(OBJS) $(LIBTARGET) .PRECIOUS: $(OBJS)
$(MAKELIB) $(MAKELIBFLAGS) -l $@ $^ $(MAKELIB) $(MAKELIBFLAGS) -l $@ $^
.IF $(NO_REZ) == $(NULL)
$(LIBTARGET):: lib$(LIB).r
$(CATREZ) -d $@ $(OBJ_DIR)lib$(LIB).r
.END
# Use "dmake force; dmake build" to update all the object files in a library # Use "dmake force; dmake build" to update all the object files in a library
force: $(OBJS) force: $(OBJS)
touch $< touch $<
.IF $(NO_REZ) == $(NULL)
$(LIBTARGET):: $(OBJ_DIR)lib$(LIB).r
$(CATREZ) -d $@ $(OBJ_DIR)lib$(LIB).r
.END
.INCLUDE: /src/gno/lib/librelease.mk .INCLUDE: /src/gno/lib/librelease.mk
# 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 $<