summaryrefslogtreecommitdiff
path: root/Makefile
blob: ed2861f88316b269153bc22df3a4d40ecfb531ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
HC := ghc
HSSRCS := unicode.hs
CSRCS := pickme.c
OBJS := $(HSSRCS:.hs=.o)
TARGET := pickme
UNICODEDATA := UnicodeData.txt
CFLAGS != pkg-config --cflags gtk4 | sed 's/ -/ -optc-/g'
LIBS != pkg-config --libs gtk4

all: $(TARGET) $(UNICODEDATA)

clean:
	@rm $(TARGET) $(OBJS)

$(OBJS): $(HSSRCS)
	$(HC) -c -O $^

$(TARGET): $(CSRCS) $(OBJS)
	$(HC) --make -no-hs-main -g $(CFLAGS) $(LIBS) -o $(TARGET) $^

$(UNICODEDATA):
	wget -O $@ -o /dev/null 'https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt'