6 CFLAGS = $(DEFS) -g -O2 -c
7 LINKER = $(CC) $(LIBS) -shared -o
9 ## The default location for installation. Everything is placed in
10 ## subdirectories of this directory. The default values for many of
11 ## the variables below are expressed in terms of this one, so you may
12 ## not need to change them. This defaults to /usr/local.
15 ## Like `prefix', but used for architecture-specific files.
18 ## Where to install and expect executable files to be run by XEmacs
19 ## rather than directly by users, and other architecture-dependent data
20 ## ${archlibdir} is a subdirectory of this.
21 libdir=${exec_prefix}/lib
24 INCLUDE_INSTALLDIR = ${prefix}/include
25 LIB_INSTALLDIR = ${libdir}
26 DB_INSTALLDIR = ${libdir}/chise
29 VERSION = @PACKAGE_VERSION@
37 $(LINKER) libchise.so chise.o
39 chise.o: chise.c chise.h
40 $(CC) $(CFLAGS) chise.c
43 install: install.h install.so install.db
46 install -c chise.h $(INCLUDE_INSTALLDIR)
48 install.so: libchise.so
49 install -c libchise.so $(LIB_INSTALLDIR)/libchise.so.$(VERSION)
50 (cd $(LIB_INSTALLDIR); ln -sf libchise.so.$(VERSION) libchise.so)
53 -mkdir -p $(DB_INSTALLDIR)
54 ln -sf `xemacs -q -batch -eval '(princ (file-name-as-directory exec-directory))'`char-db $(DB_INSTALLDIR)
57 -$(RM) *.o *.so sample
60 sample: sample.c libchise.so
61 gcc -o sample sample.c -lchise