diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-04 12:10:24 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-04 12:10:24 -0800 |
commit | bdccbad1c7da40d80f976858582574eb3c76dd40 (patch) | |
tree | 8dbc7d849b1303acb7302c344b12a2eb2bcbe567 /Makefile | |
parent | 9dca18dfee0c596c231b762c945a14baa8d8da94 (diff) | |
download | txr-bdccbad1c7da40d80f976858582574eb3c76dd40.tar.gz txr-bdccbad1c7da40d80f976858582574eb3c76dd40.tar.bz2 txr-bdccbad1c7da40d80f976858582574eb3c76dd40.zip |
Build configuration via configure script, with cross compiling support.
(Tested by cross-compiling txr on an x86 GNU/Linux system
to run on a MIPS-based GNU/Linux system).
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -26,19 +26,13 @@ # Test data in the tests/ directory is in the public domain, # unless it contains notices to the contrary. -OPT_FLAGS := -O2 -LANG_FLAGS := -ansi -D_GNU_SOURCE -DIAG_FLAGS := -Wall -DBG_FLAGS := -g -LEX_DBG_FLAGS := -TXR_DBG_OPTS := --gc-debug -LEXLIB := fl +-include config.make CFLAGS := $(LANG_FLAGS) $(DIAG_FLAGS) $(OPT_FLAGS) $(DBG_FLAGS) OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o txr: $(OBJS) - $(CC) $(CFLAGS) -o $@ $^ -l$(LEXLIB) + $(CC) $(CFLAGS) -o $@ $^ $(LEXLIB) -include dep.mk @@ -52,6 +46,9 @@ clean: rm -f txr $(OBJS) \ y.tab.c lex.yy.c y.tab.h y.output $(TESTS:.ok=.out) +distclean: clean + rm -f config.make + depend: txr ./txr depend.txr > dep.mk @@ -71,3 +68,7 @@ tests/004/%: TXR_ARGS := -a 123 -b -c %.expected: %.txr ./txr $(TXR_OPTS) $^ $(TXR_ARGS) > $@ + +config.make: + @echo "config.make missing: you didn't run ./configure" + @exit 1 |