diff options
Diffstat (limited to '2024/Makefile')
-rw-r--r-- | 2024/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/2024/Makefile b/2024/Makefile index 0d5001f..97c6c1c 100644 --- a/2024/Makefile +++ b/2024/Makefile @@ -1,13 +1,18 @@ +C_SRC := $(wildcard *.c) +C_EXE := $(C_SRC:.c=) HS_SRC := $(wildcard *.hs) HS_EXE := $(HS_SRC:.hs=) OBJDIR := .obj .PHONY: all clean -all: $(HS_EXE) +all: $(C_EXE) $(HS_EXE) clean: - rm -rf $(HS_EXE) $(OBJDIR) + rm -rf $(C_EXE) $(HS_EXE) $(OBJDIR) + +$(C_EXE): %: %.c + gcc -Wall -Wextra -std=c23 -O2 -o $@ $< $(HS_EXE): %: %.hs | $(OBJDIR) ghc -Wall -hidir $(OBJDIR) -odir $(OBJDIR) -o $@ $< |