From 6bafc3a9b4ddb36232430ef2d6a8f25666a50c8a Mon Sep 17 00:00:00 2001 From: gdr-ftp Date: Sun, 15 Feb 1998 19:18:20 +0000 Subject: [PATCH] lib.mk: - fix definition of OBJS such that they can be placed in the /obj hierarchy. Also added some more default targets for the same purpose. - added in a rule to append an rVersion resource to the library, unless the NO_REZ macro is set in the makefile --- lib/lib.mk | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/lib.mk b/lib/lib.mk index 19ca616..764b1f1 100644 --- a/lib/lib.mk +++ b/lib/lib.mk @@ -1,12 +1,13 @@ # -# $Id: lib.mk,v 1.3 1998/02/09 08:44:01 taubert Exp $ +# $Id: lib.mk,v 1.4 1998/02/15 19:18:20 gdr-ftp 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) +# Objects are source file names with [.c|.asm] changed to .o, and placed +# in the /obj hierarchy. +OBJS *= $(OBJ_DIR){$(SRCS:b)}.o # # Check for user-specified compile/load options @@ -38,5 +39,14 @@ $(LIBTARGET) .PRECIOUS: $(OBJS) force: $(OBJS) 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 +# Default target for object files +$(OBJ_DIR)%.o: %.c ; $(CC) -o $@ $(CFLAGS) -a0 -c $< +$(OBJ_DIR)%.o: %.asm ; $(AS) -o $@ $(ASFLAGS) -a0 -c $< +$(OBJ_DIR)%.r: %.rez ; $(REZ) -o $@ $(REZFLAGS) $<