From 28a3fa7afebb9937fa42b9d53678eb8fd0be529d Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 8 Nov 2017 03:49:10 +0100 Subject: Init commit --- Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..17c5f37 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ + + +CC=gcc +PROG=mesms +LIBS=-lcurses -lreadline +HEADERS=$(wildcard *.h) +FILES=readline.c wind.c +OBJ_FILES := $(FILES:.c=.o) +CFLAGS+=-std=gnu99 + + +all: $(PROG) + +debug: CFLAGS += -DDEBUG -g +debug: $(PROG) + +$(PROG): main.c main.h $(OBJ_FILES) + $(CC) $(CFLAGS) $(LIBS) -o $@ main.c $(OBJ_FILES) + + + + +%.o: %.c $(HEADERS) + $(CC) $(CFLAGS) $(LIBS) -c -o $@ $< + + + +.PHONY: clean mrproper + +clean: + rm -f $(OBJ_FILES) + +mrproper: clean + rm -f ./$(PROG) + + +install: $(PROG) + cp $(PROG) /usr/bin/$(PROG) + @echo 'Installation success' + +uninstall: /usr/bin/$(PROG) + rm -f /usr/bin/$(PROG) + -- cgit v1.2.3