3 # Copyright (c) 2004 Bruno T. C. de Oliveira
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 SOURCES=$(wildcard *.c)
22 HEADERS=$(wildcard *.h)
24 OBJECTS=$(patsubst %.c,%.o,$(SOURCES))
26 ROTE_VERSION=@PACKAGE_VERSION@
27 ROTE_SONAME=librote.so.0
30 CFLAGS=@CFLAGS@ -Wall -fPIC
34 exec_prefix=@exec_prefix@
36 includedir=@includedir@
39 all: librote.so.$(ROTE_VERSION)
42 mkdir -p $(includedir)/rote
43 rm -f $(includedir)/rote/*.h
44 cp rote.h $(includedir)/rote
46 cp librote.so.$(ROTE_VERSION) $(libdir)
47 cd $(libdir) && ln -sf librote.so.$(ROTE_VERSION) librote.so
48 cd $(libdir) && ln -sf librote.so.$(ROTE_VERSION) $(ROTE_SONAME)
50 cp -p rote-config $(bindir)
51 @echo "-----------------------------------------------------------"
52 @echo "ROTE - Our Own Terminal Emulation Library v$(ROTE_VERSION)"
54 @echo "Include files installed at: $(includedir)"
55 @echo "Library files installed at: $(libdir)"
56 @echo "rote-config executable : $(bindir)/rote-config"
58 @echo "To find out what compiler arguments you should use to"
59 @echo "compile programs that use rote, use the rote-config"
60 @echo "program (make sure $(bindir) is in your path)."
61 @echo "-----------------------------------------------------------"
63 librote.so.$(ROTE_VERSION): $(OBJECTS)
64 $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname=$(ROTE_SONAME) $(OBJECTS) $(LDFLAGS) $(LIBS)
66 .depends: $(SOURCES) $(HEADERS)
67 $(CC) $(CFLAGS) -MM $(SOURCES) >.depends
72 rm -f *.o .depends librote.so.*
75 rm -rf autom4te.cache configure config.status config.log Makefile rote-config
77 .PHONY: clean all install pristine