# Makefile for CLISP module set postgresql

srcdir = /usr/lib64/clisp-2.49.95+/postgresql
CC = gcc
PQCPPFLAGS = -I/usr/include/libsvm
CFLAGS = -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wa,--noexecstack
CLISP = /usr/bin/clisp -K base  -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -norc -q
CLISP_LINKKIT = /usr/lib64/clisp-2.49.95+/linkkit

LN = ln

MAKE = make

SHELL = /bin/sh

GENERATED = postgresql.o postgresql.fas sql.fas
DISTRIBFILES = link.sh Makefile $(GENERATED) \
	$(srcdir)/postgresql.lisp $(srcdir)/sql.lisp $(srcdir)/README
distribdir =

# default target: make the module
clisp-module : $(GENERATED)

postgresql.c postgresql.fas : $(srcdir)/postgresql.lisp
	$(CLISP) -c $(srcdir)/postgresql.lisp -o ./

postgresql.o : postgresql.c config.h
	$(CC) $(CPPFLAGS) $(PQCPPFLAGS) $(CFLAGS) -I$(CLISP_LINKKIT) \
		-c postgresql.c

sql.fas: $(srcdir)/sql.lisp
	$(CLISP) -c $(srcdir)/sql.lisp -o ./

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

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

distclean : clean

force :

