# Makefile for CLISP module set Berkeley-DB

CC = @CC@
DBCPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
INCLUDES= ..
MODPREP = ../modprep.fas
CLISP = clisp -q -norc

LN = ln

MAKE = make

SHELL = /bin/sh

DISTRIBFILES = bdb.o link.sh Makefile dbi.lisp preload.lisp
distribdir =

all : bdb.o dbi.fas

dbi.fas : dbi.lisp
	$(CLISP) -c dbi.lisp

bdb.m.c: bdb.c $(MODPREP)
	$(CLISP) $(MODPREP) bdb.c

bdb.o : bdb.m.c $(INCLUDES)/clisp.h config.h
	$(CC) $(CPPFLAGS) $(DBCPPFLAGS) $(CFLAGS) -I$(INCLUDES) -c bdb.m.c -o bdb.o

# Make a module
clisp-module : all

# Make a module distribution into $(distribdir)
clisp-module-distrib : clisp-module force
	$(LN) $(DISTRIBFILES) $(distribdir)

clean : force
	rm -f core *.o *.a *.m.c *.fas *.lib

distclean : clean

force :

