From c9684709acb26c54ffa0ec04cee2cc46b1ba56be Mon Sep 17 00:00:00 2001 From: Kaz Kylheku <kaz@kylheku.com> Date: Thu, 4 Dec 2014 22:03:05 -0800 Subject: TXR now builds optimized and debug at the same time. Optimized object files are under opt/ and debug object files are under dbg/. The debug txr executable is called txr-dbg. * Makefile (CFLAGS): $(OPT_FLAGS) is omitted from CFLAGS, so we can expand it where appropriate. (ADD_CONF, EACH_CONF): New variables, used as macros. (DBG_OBJS, OPT_OBJS): New variables. (dbg/%.o, opt/%.o): New rules. (all): New target. ($(PROG)-dbg): New target. (clean): Remove the object directories with rm -rf. Remove $(PROG)-dbg. (depend): Pass $(OPT_OBJS) and $(DBG_OBJS) to depend.txr Also: various target-specific assignments for object files had to be split for rel and dbg. * depend.txr: Updated to handle dbg/ or rel/ prefix on object file paths. * dep.mk: Regenerated. --- depend.txr | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'depend.txr') diff --git a/depend.txr b/depend.txr index fc67696d..3c5fbc37 100644 --- a/depend.txr +++ b/depend.txr @@ -1,10 +1,12 @@ @(next :args) @(collect) @(cases) -@dir/@file.o +@conf/@dir/@file.o +@(bind pfx `@conf/@dir`) @(or) -@file.o +@conf/@file.o @(bind dir ".") +@(bind pfx conf) @(end) @(next `@dir/@file.c`) @(collect) @@ -17,6 +19,6 @@ @(end) @(end) @(output) -@dir/@file.o:@(rep) @header@(end) +@pfx/@file.o:@(rep) @header@(end) @(end) @(end) -- cgit v1.2.3