Print this page
9128 cw(1onbld) should be able to run multiple shadows
9129 file-locking tests shouldn't build multiple source files in one compiler invocation
9130 DTrace tst.gcc.d isn't useful
9132 cw(1onbld) shouldn't shadow pure preprocessing
Reviewed by: Andy Fiddaman <omnios@citrus-it.net>

@@ -14,19 +14,19 @@
 #
 
 include $(SRC)/cmd/Makefile.cmd
 include $(SRC)/test/Makefile.com
 
-UTILS = util.c
+OBJECTS=util.o runtests.32.o runtests.64.o acquire-lock.32.o acquire-lock.64.o
 
 PROGS = \
         runtests \
         acquire-lock
 
 CSTD = $(CSTD_GNU99)
 
-SRCS = $(PROGS:%=%.c) $(UTILS)
+SRCS = $(PROGS:%=%.c) $(UTILS:%.o=%.c)
 PROGS32 = $(PROGS:%=%.32)
 PROGS64 = $(PROGS:%=%.64)
 
 LINTS = $(PROGS:%=%.ln)
 LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2

@@ -59,16 +59,22 @@
         $(INS.rename)
 
 %.ln: %.c
         $(LINT.c) $< $(UTILS) $(LDLIBS)
 
-%.64: %.c
-        $(LINK64.c) -o $@ $< $(UTILS) $(LDLIBS64)
+%.64.o: %.c
+        $(COMPILE64.c) $< -o $@
+
+%.32.o: %.c
+        $(COMPILE.c) $< -o $@
+
+%.64: %.64.o util.64.o
+        $(LINK64.c) -o $@ $< util.64.o $(LDLIBS64)
         $(POST_PROCESS)
 
-%.32: %.c
-        $(LINK.c) -o $@ $< $(UTILS) $(LDLIBS)
+%.32: %.32.o util.32.o
+        $(LINK.c) -o $@ $< util.32.o $(LDLIBS)
         $(POST_PROCESS)
 
 clobber:
         $(RM) $(PROGS32) $(PROGS64)