Let the configure script generate rote{,w}.h
[librote.git] / Makefile.in
blobc312cd494762083c39ea4593f03eb567f478d4d8
1 # Makefile for librote
3 # Copyright (c) 2004 Bruno T. C. de Oliveira
4 #
5 # LICENSE INFORMATION:
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public
8 # License as published by the Free Software Foundation; either
9 # version 2 of the License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public
17 # License along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # Copyright (c) 2002 Bruno T. C. de Oliveira
21 OBJECTS = inject.o inject_csi.o rote.o rote_keymap.o
23 ifeq (@ROTE_LIB_NAME@,rotew)
24 OBJECTS += utf8.o
25 endif
27 ROTE_VERSION=@PACKAGE_VERSION@
29 ROTE_SONAME=lib@ROTE_LIB_NAME@.so.0
30 ROTE_LIB_NAME=lib@ROTE_LIB_NAME@.so
32 CC=@CC@
33 CFLAGS=@CFLAGS@ -Wall -fPIC
34 LIBS=@LIBS@
35 LDFLAGS=@LDFLAGS@
36 prefix=@prefix@
37 exec_prefix=@exec_prefix@
38 libdir=@libdir@
39 includedir=@includedir@
40 bindir=@bindir@
42 all: $(ROTE_LIB_NAME).$(ROTE_VERSION)
44 install: all
45 mkdir -p $(DESTDIR)$(includedir)/rote
46 rm -f $(DESTDIR)$(includedir)/rote/@ROTE_LIB_NAME@.h
47 cp rote.h $(DESTDIR)$(includedir)/rote/@ROTE_LIB_NAME@.h
48 mkdir -p $(DESTDIR)$(libdir)
49 cp $(ROTE_LIB_NAME).$(ROTE_VERSION) $(DESTDIR)$(libdir)
50 cd $(DESTDIR)$(libdir) && ln -sf $(ROTE_LIB_NAME).$(ROTE_VERSION) $(ROTE_LIB_NAME)
51 cd $(DESTDIR)$(libdir) && ln -sf $(ROTE_LIB_NAME).$(ROTE_VERSION) $(ROTE_SONAME)
52 chmod 755 rote-config
53 mkdir -p $(DESTDIR)$(bindir)
54 cp -p rote-config $(DESTDIR)$(bindir)
55 @echo "-----------------------------------------------------------"
56 @echo "ROTE - Our Own Terminal Emulation Library v$(ROTE_VERSION)"
57 @echo
58 @echo "Include files installed at: $(DESTDIR)$(includedir)"
59 @echo "Library files installed at: $(DESTDIR)$(libdir)"
60 @echo "rote-config executable : $(DESTDIR)$(bindir)/rote-config"
61 @echo
62 @echo "To find out what compiler arguments you should use to"
63 @echo "compile programs that use rote, use the rote-config"
64 @echo "program (make sure $(DESTDIR)$(bindir) is in your path)."
65 @echo "-----------------------------------------------------------"
67 .c.o:
68 $(CC) -c $(CFLAGS) $<
70 $(ROTE_LIB_NAME).$(ROTE_VERSION): $(OBJECTS)
71 $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname=$(ROTE_SONAME) $(OBJECTS) $(LDFLAGS) $(LIBS)
73 clean:
74 rm -f *.o $(ROTE_LIB_NAME).*
76 pristine: clean
77 rm -rf autom4te.cache configure config.status config.log Makefile rote-config rote.h
79 .PHONY: clean all install pristine