blob: 97c6c1c644e1c30b16453a2d81f1f08d8e8108de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
C_SRC := $(wildcard *.c)
C_EXE := $(C_SRC:.c=)
HS_SRC := $(wildcard *.hs)
HS_EXE := $(HS_SRC:.hs=)
OBJDIR := .obj
.PHONY: all clean
all: $(C_EXE) $(HS_EXE)
clean:
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 $@ $<
$(OBJDIR):
mkdir $(OBJDIR)
|