diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5d5aca7 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +BIN=bin +OBJ=obj +SRC=src + +CC = gcc +CFLAGS = -lncurses + +${BIN}/nms: ${OBJ}/nms.o + $(CC) $(CFLAGS) -o $@ $^ + +${OBJ}/nms.o: ${SRC}/nms.c ${SRC}/nms.h + $(CC) $(CFLAGS) -o $@ -c ${SRC}/nms.c + +clean: + rm -f ${BIN}/* + rm -f $(OBJ)/* diff --git a/src/obj/.gitignore b/bin/.gitignore similarity index 100% rename from src/obj/.gitignore rename to bin/.gitignore diff --git a/obj/.gitignore b/obj/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/obj/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index ffc2556..0000000 --- a/src/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -CC = gcc -ODIR = obj -DEPS = nms.h -CFLAGS = -lncurses - -_OBJ = nms.o -OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) - -$(ODIR)/%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -nms: $(OBJ) - $(CC) -o $@ $^ $(CFLAGS) - -clean: - rm -f $(ODIR)/*.o nms