X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=Makefile;h=1d4ce07d9685fd4333e054ae051635a7f3e8e3c7;hb=2c77b5e6e665dcce85cc22d7673573c46137593d;hp=de3c650376e4f208cb4370e0889d5aa626048440;hpb=6a78a5788120dbae26ee01ddc85d6a014155eba1;p=smdp.git diff --git a/Makefile b/Makefile index de3c650..1d4ce07 100644 --- a/Makefile +++ b/Makefile @@ -18,11 +18,17 @@ # along with this program. If not, see . # -CFLAGS = -Wall -g +CFLAGS = -O3 -Wall +LDFLAGS = -s LDLIBS = -lncurses OBJECTS = cstring.o cstack.o markdown.o parser.o viewer.o mdp.o DESTDIR ?= /usr/bin +ifeq ($(DEBUG),1) +CFLAGS := -Wall -g -O0 +LDFLAGS := +endif + all: mdp mdp: $(OBJECTS) @@ -31,9 +37,11 @@ clean: $(RM) $(OBJECTS) mdp install: mdp - if which strip 1>/dev/null 2>&1; then strip mdp; fi install -d $(PREFIX)$(DESTDIR) install -m 755 mdp $(PREFIX)$(DESTDIR)/mdp -.PHONY: all clean install +uninstall: + rm -f $(PREFIX)$(DESTDIR)/mdp + +.PHONY: all clean install uninstall