From: FreeBirdLjj Date: Wed, 17 Sep 2014 14:45:33 +0000 (+0800) Subject: Using the implicit rules of `make`. X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=6a78a5788120dbae26ee01ddc85d6a014155eba1;p=smdp.git Using the implicit rules of `make`. --- diff --git a/Makefile b/Makefile index c99d35d..de3c650 100644 --- a/Makefile +++ b/Makefile @@ -18,22 +18,17 @@ # along with this program. If not, see . # -CC = /usr/bin/gcc CFLAGS = -Wall -g -LDFLAGS = -lncurses +LDLIBS = -lncurses OBJECTS = cstring.o cstack.o markdown.o parser.o viewer.o mdp.o DESTDIR ?= /usr/bin -%.o: %.c - $(CC) $(CFLAGS) -c $< - all: mdp mdp: $(OBJECTS) - $(CC) $(CFLAGS) -o mdp $(OBJECTS) $(LDFLAGS) clean: - rm -f $(OBJECTS) mdp + $(RM) $(OBJECTS) mdp install: mdp if which strip 1>/dev/null 2>&1; then strip mdp; fi