diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2016-04-25 22:10:34 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2016-04-25 22:10:55 -0700 |
commit | 887a0b4294001c95187eeaeff20ad748125466d7 (patch) | |
tree | 74d530eeb49d4e2a003d9533ff110e6017c251e3 /Makefile | |
parent | a917ebdd8912e32b170f31177e1213da95fc6d35 (diff) |
Improve Makefile compatibility
make now runs cleanly on default BSD make. This uglies it up a little,
but it was so close it might as well be made as widely compatible as
possible.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -11,19 +11,22 @@ INSTALL=install INSTALL_PROGRAM=$(INSTALL) INSTALL_DATA=${INSTALL} -m 644 +OBJECTS=fzy.o match.o tty.o choices.o +TESTOBJECTS=fzytest.o match.o choices.o + all: fzy -fzytest: fzytest.o match.o choices.o - $(CC) $(CFLAGS) $(CCFLAGS) -o $@ $^ +fzytest: $(TESTOBJECTS) + $(CC) $(CFLAGS) $(CCFLAGS) -o $@ $(TESTOBJECTS) test: check check: fzytest $(DEBUGGER) ./fzytest -fzy: fzy.o match.o tty.o choices.o - $(CC) $(CFLAGS) $(CCFLAGS) -o $@ $^ +fzy: $(OBJECTS) + $(CC) $(CFLAGS) $(CCFLAGS) -o $@ $(OBJECTS) -%.o: %.c config.h +.c.o: config.h $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< config.h: @@ -39,6 +42,6 @@ fmt: clang-format -i *.c *.h clean: - $(RM) fzy fzytest *.o + rm -f fzy fzytest *.o .PHONY: test check all clean install fmt |