X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=Makefile;h=1d4ce07d9685fd4333e054ae051635a7f3e8e3c7;hb=2c77b5e6e665dcce85cc22d7673573c46137593d;hp=7c0cbe75dbe3127ebef3951decc3c0a1bda419f1;hpb=3da34e1957b3484506b5f0f79f84f64a4cff2f1b;p=smdp.git diff --git a/Makefile b/Makefile index 7c0cbe7..1d4ce07 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Makefile # Copyright (C) 2014 Michael Goehler # -# This file is part of mpd. +# This file is part of mdp. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,27 +18,30 @@ # along with this program. If not, see . # -CC = /usr/bin/gcc -CFLAGS = -Wall -g -LDFLAGS = -lncurses +CFLAGS = -O3 -Wall +LDFLAGS = -s +LDLIBS = -lncurses OBJECTS = cstring.o cstack.o markdown.o parser.o viewer.o mdp.o DESTDIR ?= /usr/bin -%.o: %.c - $(CC) $(CFLAGS) -c $< - -mdp: $(OBJECTS) - $(CC) $(CFLAGS) -o mdp $(OBJECTS) $(LDFLAGS) +ifeq ($(DEBUG),1) +CFLAGS := -Wall -g -O0 +LDFLAGS := +endif all: mdp +mdp: $(OBJECTS) + clean: - rm -f $(OBJECTS) mdp + $(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: clean install +uninstall: + rm -f $(PREFIX)$(DESTDIR)/mdp + +.PHONY: all clean install uninstall