aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-02 19:44:39 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-02 19:44:39 +0100
commit382a40466a9339b8153180303ae799ed9fd7c868 (patch)
treef50514548417f291e2f2c9051971d8c8ce9d1316 /Makefile
parentBroke read_vcalendar of into own file. (diff)
downloadcalp-382a40466a9339b8153180303ae799ed9fd7c868.tar.gz
calp-382a40466a9339b8153180303ae799ed9fd7c868.tar.xz
Start work on a scheme interface.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 12 insertions, 5 deletions
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