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