summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaura Aino Violetta Aléanor <lav@vampires.gay>2023-05-11 18:25:57 +0200
committerLaura Aino Violetta Aléanor <lav@vampires.gay>2023-05-11 18:25:57 +0200
commite68de96ac0e70531c096d0a55fe9729020b4b7f2 (patch)
tree3f22055e0dbc14ab0214492fd51b66d8c565490d
parent37c7d6885280cf339a2b75e52d716343dba56230 (diff)
downloadpickme-e68de96ac0e70531c096d0a55fe9729020b4b7f2.tar.gz
pickme-e68de96ac0e70531c096d0a55fe9729020b4b7f2.zip
improve makefileHEADmistress
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6a0dc4b..ed2861f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,11 @@
+HC := ghc
HSSRCS := unicode.hs
CSRCS := pickme.c
OBJS := $(HSSRCS:.hs=.o)
TARGET := pickme
UNICODEDATA := UnicodeData.txt
-CFLAGS := -I/usr/include/gtk-4.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/graphene-1.0 -I/usr/lib64/graphene-1.0/include -optc-mfpmath=sse -optc-msse -optc-msse2 -optc-pthread -optc-g -optc-O #-optc-fsanitize=address -optl-fsanitize=address
-LIBS := -optc-L/home/lav/.ghcup/ghc/9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1 -lgtk-4 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgraphene-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
+CFLAGS != pkg-config --cflags gtk4 | sed 's/ -/ -optc-/g'
+LIBS != pkg-config --libs gtk4
all: $(TARGET) $(UNICODEDATA)
@@ -12,10 +13,10 @@ clean:
@rm $(TARGET) $(OBJS)
$(OBJS): $(HSSRCS)
- ghc -c -O $^
+ $(HC) -c -O $^
$(TARGET): $(CSRCS) $(OBJS)
- ghc --make -no-hs-main -g $(CFLAGS) $(LIBS) -o $(TARGET) $^
+ $(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'