From 382a40466a9339b8153180303ae799ed9fd7c868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 2 Feb 2019 19:44:39 +0100 Subject: Start work on a scheme interface. --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e522316e..12045831 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,12 @@ LEX := flex DIRS := obj -CFLAGS = -std=gnu99 -Wall -Wextra -pedantic -DSAFE_STR -DSAFE_HASH -ggdb -#LFLAGS = -#LDFLAGS = +CFLAGS = -std=gnu99 -Wall -Wextra -pedantic \ + -DSAFE_STR -DSAFE_HASH -ggdb \ + -fPIC \ + $(shell guile-config compile) +# LFLAGS = +LDFLAGS = -fPIC $(shell guile-config link) C_FILES = $(wildcard *.c) INC_FILES = $(wildcard *.inc) @@ -16,14 +19,18 @@ H_FILES = $(wildcard *.h) $(shell mkdir -p $(DIRS)) -all: parse +all: parse libguile-calendar.so obj/%.o : %.c $(H_FILES) $(INC_FILES) $(CC) -c -o $@ $< ${CFLAGS} +libguile-calendar.so: $(O_FILES) + $(CC) -shared -o $@ $^ $(LDFLAGS) + parse: $(O_FILES) - $(CC) -o $@ $^ ${LDFLAGS} + $(CC) -o $@ $^ $(LDFLAGS) clean: -rm parse -rm obj/*.o + -rm *.so -- cgit v1.2.3