CC = @CC@ DEFS = @DEFS@ LIBS = @LIBS@ -ldb #CC = gcc CFLAGS = $(DEFS) -g -O2 -c LINKER = $(CC) $(LIBS) -shared -o ## The default location for installation. Everything is placed in ## subdirectories of this directory. The default values for many of ## the variables below are expressed in terms of this one, so you may ## not need to change them. This defaults to /usr/local. prefix=/usr/local ## Like `prefix', but used for architecture-specific files. exec_prefix=${prefix} ## Where to install and expect executable files to be run by XEmacs ## rather than directly by users, and other architecture-dependent data ## ${archlibdir} is a subdirectory of this. libdir=${exec_prefix}/lib INCLUDE_INSTALLDIR = ${prefix}/include LIB_INSTALLDIR = ${libdir} DB_INSTALLDIR = ${libdir}/chise VERSION = @PACKAGE_VERSION@ RM = /bin/rm -f all: libchise.so libchise.so: chise.o $(LINKER) libchise.so chise.o chise.o: chise.c chise.h $(CC) $(CFLAGS) chise.c install: install.h install.so install.db install.h: install -c chise.h $(INCLUDE_INSTALLDIR) install.so: libchise.so install -c libchise.so $(LIB_INSTALLDIR)/libchise.so.$(VERSION) (cd $(LIB_INSTALLDIR); ln -sf libchise.so.$(VERSION) libchise.so) install.db: -mkdir -p $(DB_INSTALLDIR) ln -sf `xemacs -q -batch -eval '(princ (file-name-as-directory exec-directory))'`char-db $(DB_INSTALLDIR) clean: -$(RM) *.o *.so sample sample: sample.c libchise.so gcc -o sample sample.c -lchise