all:: concat3(llib-l,libname,.ln) @@\
@@\
concat3(lib,libname,.a): objs @@\
+ $(RM) $@.bak @@\
+ -$(MV) $@ $@.bak @@\
$(ARCHIVE) $@ objs @@\
$(RANLIB) $@ @@\
@@\
concat3(lib,libname,_p.a): objs @@\
+ $(RM) $@.bak @@\
+ -$(MV) $@ $@.bak @@\
cd profiled; $(ARCHIVE) ../$@ objs @@\
$(RANLIB) $@ @@\
@@\
lint:: concat3(llib-l,libname,.ln) @@\
@@\
concat3(llib-l,libname,.ln): srcs @@\
- $(LINT) concat(-C,libname) $(LINTFLAGS) srcs lintlibs @@\
+ $(LINT) concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srcs lintlibs @@\
@@\
clean:: @@\
$(RM) concat3(lib,libname,.a) concat3(lib,libname,_p.a) @@\
* Rule for building objects in libraries.
*/
+#ifdef DEBUG_LIBS
+/* When debugging, leave symbols alone (don't do LD) */
+#define library_obj_rule() @@\
+.c.o: @@\
+ $(CC) -c $(CFLAGS) $*.c
+#else
#define library_obj_rule() @@\
.c.o: @@\
$(CC) -c $(CFLAGS) $*.c @@\
-$(LD) -x -r -o a.out $*.o @@\
$(MV) a.out $*.o
+#endif
#define library_ro_object(cfile) @@\
concat(cfile,.o): concat(cfile,.c) @@\
all:: concat3(llib-l,libname,.ln) @@\
@@\
concat3(lib,libname,.a): objs @@\
+ $(RM) $@.bak @@\
+ -$(MV) $@ $@.bak @@\
$(ARCHIVE) $@ objs @@\
$(RANLIB) $@ @@\
@@\
lint:: concat3(llib-l,libname,.ln) @@\
@@\
concat3(llib-l,libname,.ln): srcs @@\
- $(LINT) concat(-C,libname) $(LINTFLAGS) srcs lintlibs @@\
+ $(LINT) concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srcs lintlibs @@\
@@\
clean:: @@\
$(RM) concat3(lib,libname,.a) @@\
#define depend_target() @@\
depend:: $(SRCS) @@\
@echo "### Now computing dependencies" @@\
- @$(DEPEND) -s "# DO NOT DELETE" $(CFLAGS) $(SRCS) @@\
+ @$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS) @@\
#define clean_target() @@\
clean:: @@\