diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-09 23:34:14 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-09 23:34:14 +0100 |
| commit | 6158bfb63b5c937ebc4827a2174b4080339a2594 (patch) | |
| tree | d8dc2aced07db7857999ea0b9201fb3223f5f357 /Makefile | |
| parent | 7b148f8bc5c1c7cd148744b641acfdc1c8b8da4c (diff) | |
using make
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4a2ba81 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +WORK_DIR = . +SRC_DIR = $(WORK_DIR)/src +INC_DIR = $(WORK_DIR)/include + +CSH_FLAGS = -Wall -Wextra -Werror -pedantic -I$(INC_DIR) + +CC = clang +CC_STD = -std=c11 +CC_FLAGS = $(CC_STD) $(CSH_FLAGS) + +CXX = clang++ +CXX_STD = -std=c++11 +CXX_FLAGS = -fno-rtti -fno-exceptions $(CXX_STD) $(CSH_FLAGS) + +XDG_SHELL_PROT = $(WORK_DIR)/xdg-shell.xml + +WAYCLOCK = $(WORK_DIR)/wayclock +SOURCES = \ + $(SRC_DIR)/wayclock.cc \ + $(SRC_DIR)/xdg-shell.c + +OBJECTS = $(SOURCES:.cc=.o) + +all: $(WAYCLOCK) + +$(WAYCLOCK): $(OBJECTS) + $(CXX) $(CXX_FLAGS) -o $@ $^ + +%.o: %.cc + $(CXX) $(CXX_FLAGS) -c -o $@ $< + +%.o: %.c + $(CC) $(CC_FLAGS) -c -o $@ $< + +.PHONY: clean +clean: + rm -f $(OBJECTS) $(WAYCLOCK)
\ No newline at end of file |
