X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=Makefile;h=63a1feb9ef37b349e8d951b8c7d65d654894d03f;hb=ecc66f8a935eb4a3188b5336170182e34812fd40;hp=de3c650376e4f208cb4370e0889d5aa626048440;hpb=6a78a5788120dbae26ee01ddc85d6a014155eba1;p=smdp.git diff --git a/Makefile b/Makefile index de3c650..63a1feb 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,10 @@ 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 + install -Dm755 mdp $(PREFIX)$(DESTDIR)/mdp + +uninstall: + rm -f $(PREFIX)$(DESTDIR)/mdp -.PHONY: all clean install +.PHONY: all clean install uninstall