diff options
author | Krow Savcik <krow@savcik.xyz> | 2023-12-25 14:35:33 +0200 |
---|---|---|
committer | Krow Savcik <krow@savcik.xyz> | 2023-12-25 14:35:33 +0200 |
commit | 1c6ad8f0fc372fe2234455e24745ef054d572e19 (patch) | |
tree | b7c0b889f1cde6ee5e761cba4454eed57934d9b9 | |
parent | 9e660e594f6d3a43ea1427fb872801a2fcedad93 (diff) |
Change build to special directory
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,19 +1,22 @@ include config.mk -OBJ = ui.o canvas.o user.o palette.o tools.o debug.o +TOBJ = ui.o canvas.o user.o palette.o tools.o debug.o +OBJ = $(addprefix build/, ${TOBJ}) all: build run build: ${OBJ} src/cdraw.c - mkdir build ${CC} ${CFLAGS} ${LIBS} ${OBJ} src/cdraw.c -o build/cdraw +prep: + mkdir -p build + run: ./build/cdraw -%.o: src/%.c - ${CC} ${CFLAGS} $< -c +build/%.o: src/%.c + ${CC} ${CFLAGS} $< -c -o $@ clean: - rm *.o + rm $(OBJ) rm build/cdraw |