Changed up the Makefile a bit to make it simpler. Also changed it's location
and added a bin dir. new file: Makefile renamed: src/obj/.gitignore -> bin/.gitignore new file: obj/.gitignore deleted: src/Makefile
This commit is contained in:
parent
a82d55717a
commit
4ecd5fcfb3
16
Makefile
Normal file
16
Makefile
Normal file
@ -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)/*
|
0
src/obj/.gitignore → bin/.gitignore
vendored
0
src/obj/.gitignore → bin/.gitignore
vendored
2
obj/.gitignore
vendored
Normal file
2
obj/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
16
src/Makefile
16
src/Makefile
@ -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
|
|
Loading…
Reference in New Issue
Block a user