diff options
Diffstat (limited to 'Makefile')
| -rwxr-xr-x | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..fc49e88 --- /dev/null +++ b/Makefile | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | .PHONY: all clean | ||
| 2 | |||
| 3 | CC := gcc | ||
| 4 | CFLAGS := -I. -Wall -Wextra -Wno-unused-function -Wno-unused-variable -DCORE_UNITY | ||
| 5 | LDLIBS := -lX11 -lm | ||
| 6 | |||
| 7 | BUILD_DIR := build | ||
| 8 | TARGET := $(BUILD_DIR)/app | ||
| 9 | SOURCE := source/core/core.c | ||
| 10 | |||
| 11 | all: $(TARGET) | ||
| 12 | |||
| 13 | $(BUILD_DIR): | ||
| 14 | mkdir -p $(BUILD_DIR) | ||
| 15 | |||
| 16 | $(TARGET): $(BUILD_DIR) $(SOURCE) | ||
| 17 | $(CC) $(CFLAGS) $(SOURCE) $(LDLIBS) -o $(TARGET) | ||
| 18 | |||
| 19 | clean: | ||
| 20 | rm -rf $(BUILD_DIR) | ||
