diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:25:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:25:31 +0200 |
commit | 3ef4603788b3e4cef56bc113903548e71ade06a9 (patch) | |
tree | 7ffe7547c29dec58de4f8e08638858190c6b815d /Makefile | |
parent | Update config.mk (diff) | |
download | loc-b5e1fa860ae266220a70ed455339e37bb6d09ab2.tar.gz loc-b5e1fa860ae266220a70ed455339e37bb6d09ab2.tar.bz2 loc-b5e1fa860ae266220a70ed455339e37bb6d09ab2.tar.xz |
Improve makefile and fix warnings4.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -3,11 +3,15 @@ CONFIGFILE = config.mk include $(CONFIGFILE) + all: loc loc.o: loc.c arg.h -loc: loc.o - $(CC) -o $@ loc.o $(LDFLAGS) +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +.o: + $(CC) -o $@ $< $(LDFLAGS) check: loc test "$$(./loc < tests/0)" = 0 @@ -67,7 +71,7 @@ uninstall: -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/loc.1" clean: - -rm -f -- loc.o loc + -rm -f -- *.o *.su loc .SUFFIXES: .SUFFIXES: .o .c |