Print this page
7627 Build should be smarter about how SGSPROTO is created
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>

@@ -33,11 +33,13 @@
 
 %.o:            ../common/%.c
                 $(COMPILE.c) $<
                 $(POST_PROCESS_O)
 
-$(PROG):        $(MAPFILES)
+$(PROG):        $(OBJS) $(MAPFILES)
+                $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
+                $(POST_PROCESS)
 
 clean:
                 $(RM) $(OBJS) $(CLEANFILES)
 
 delete:

@@ -51,12 +53,11 @@
 # Special target for native builds (ie. when we need to build a version of ld
 # to build a version of ld :-).
 
 native:         $(SGSBINDIR)/$(PROG)
 
-$(SGSBINDIR)/$(PROG) \
-$(PROG):        $$(OBJS)
+$(SGSBINDIR)/$(PROG):   $(OBJS) $(SGSBINDIR)
                 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
                 $(POST_PROCESS)
 
 # Derived source and header files (messaging).