diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f53a3f0 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +SOURCES = parse.c list.c atom.c eval.c tokens.c +OBJECTS = $(SOURCES:.c=.o) + +CFLAGS = -Wall -g +LDFLAGS = + +CC = gcc +LD = gcc + +# ifneq ($(BUILD_TEST),) + +test: CFLAGS := $(CFLAGS) -DBUILD_TEST +test: $(OBJECTS) tst_main.o + $(LD) $(LDFLAGS) -o $@ $^ + +# else + +repl: $(OBJECTS) repl.o linenoise.o + $(LD) $(LDFLAGS) -o $@ $^ + +# endif + +.PHONY: clean +clean: + rm -f *.o + rm -f test + rm -f repl |
