diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 43 |
1 files changed, 43 insertions, 0 deletions
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) + |