From e85cc289786c0174aac3cd5e23f8096990c2562d Mon Sep 17 00:00:00 2001 From: hippoz Date: Sat, 17 Oct 2020 15:15:08 +0300 Subject: [PATCH] work on makefile --- Makefile | 15 +++++++++++++++ src/main.c | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 src/main.c diff --git a/Makefile b/Makefile index e69de29..b77a35b 100644 --- a/Makefile +++ b/Makefile @@ -0,0 +1,15 @@ +SRC_DIR=src +BIN_DIR=bin +WM_SOURCES_MAIN=$(SRC_DIR)/main.c +WM_SOURCES=$(WM_SOURCES_MAIN) + +PREFIX?=/usr/X11R6 +CFLAGS?=-Os -pedantic -Wall + +all: $(WM_SOURCES) wm + +wm: $(WM_SOURCES_MAIN) + $(CC) $(CFLAGS) -I$(PREFIX)/include $< -L$(PREFIX)/lib -lX11 -o $(BIN_DIR)/wm + +clean: + rm $(BIN_DIR)/* \ No newline at end of file diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..e9cdae1 --- /dev/null +++ b/src/main.c @@ -0,0 +1,3 @@ +int main() { + return 0; +} \ No newline at end of file