From 46ef865ebf1da811ff8ab706106e21808be154bd Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 2 Nov 2020 00:36:32 -0600 Subject: [PATCH] now it breaks on including Xlib.h --- .gitignore | 1 + Makefile | 7 +++++-- main.xc | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 649a6ef..6e27a98 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.c *.xml ableC.jar +/multiclip diff --git a/Makefile b/Makefile index 1796a11..806fb63 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ override XCFLAGS += $(addprefix -I,$(XC_INCLUDE_DIRS)) override SVFLAGS += $(addprefix -I ,$(GRAMMAR_DIRS)) +override LIBS += $(shell pkg-config --libs bdw-gc) +override INCLUDES += $(shell pkg-config --cflags bdw-gc) + all: multiclip $(ABLEC_JAR): $(GRAMMAR_SOURCES) @@ -19,10 +22,10 @@ $(ABLEC_JAR): $(GRAMMAR_SOURCES) silver-ableC -o $@ $(SVFLAGS) $(ARTIFACT) multiclip: main.c - gcc -o $@ -lgc $< + gcc -o $@ $(LIBS) $(INCLUDES) $< main.c: main.xc $(ABLEC_JAR) - java -jar $(ABLEC_JAR) $< -o $@ $(XCFLAGS) + java -jar $(ABLEC_JAR) $< $(XCFLAGS) clean: rm -f multiclip diff --git a/main.xc b/main.xc index b1fb50e..f3388f1 100644 --- a/main.xc +++ b/main.xc @@ -1,4 +1,5 @@ #include +#include #include