diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:28:22 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:28:22 +0200 |
commit | 71d6f9e01af2162b0d1b5796189a2b5a6e65b6f8 (patch) | |
tree | 7842c7eeda7e95c8763f3783752548b1877b3152 /Makefile | |
parent | m (diff) | |
download | median-2.0.1.tar.gz median-2.0.1.tar.bz2 median-2.0.1.tar.xz |
Makefile and code improvements2.0.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -3,13 +3,14 @@ CONFIGFILE = config.mk include $(CONFIGFILE) + all: median -median: median.o - $(CC) -o $@ median.o $(LDFLAGS) +.o: + $(CC) -o $@ $< $(LDFLAGS) -median.o: median.c - $(CC) -c -o $@ median.c $(CFLAGS) $(CPPFLAGS) +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) check: median test "$$(printf '%s\n' 1 5 2 | ./median)" = 2 @@ -36,7 +37,7 @@ uninstall: -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/median.1" clean: - -rm -f -- median *.o + -rm -f -- median *.o *.su .SUFFIXES: .SUFFIXES: .c .o |