File: Makefile.in

package info (click to toggle)
rote 0.2.8-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 332 kB
  • ctags: 110
  • sloc: ansic: 758; makefile: 118; sh: 50
file content (79 lines) | stat: -rw-r--r-- 2,642 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Makefile for librote
#
# Copyright (c) 2004 Bruno T. C. de Oliveira
# 
# LICENSE INFORMATION:
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
# 
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
# Copyright (c) 2002 Bruno T. C. de Oliveira

SOURCES=$(wildcard *.c)
HEADERS=$(wildcard *.h)

OBJECTS=$(patsubst %.c,%.o,$(SOURCES))

ROTE_VERSION=@PACKAGE_VERSION@
ROTE_SONAME=librote.so.0

CC=@CC@
CFLAGS=@CFLAGS@ -Wall -fPIC
LIBS=@LIBS@
LDFLAGS=@LDFLAGS@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
bindir=@bindir@

all: librote.so.$(ROTE_VERSION)

install: all
	mkdir -p $(DESTDIR)$(includedir)/rote
	rm -f $(DESTDIR)$(includedir)/rote/*.h
	cp rote.h $(DESTDIR)$(includedir)/rote
	mkdir -p $(DESTDIR)$(libdir)
	cp librote.so.$(ROTE_VERSION) $(DESTDIR)$(libdir)
	cd $(DESTDIR)$(libdir) && ln -sf librote.so.$(ROTE_VERSION) librote.so
	cd $(DESTDIR)$(libdir) && ln -sf librote.so.$(ROTE_VERSION) $(ROTE_SONAME)
	chmod 755 rote-config
	mkdir -p $(DESTDIR)$(bindir)
	cp -p rote-config $(DESTDIR)$(bindir)
	@echo "-----------------------------------------------------------"
	@echo "ROTE - Our Own Terminal Emulation Library v$(ROTE_VERSION)"
	@echo
	@echo "Include files installed at: $(DESTDIR)$(includedir)"
	@echo "Library files installed at: $(DESTDIR)$(libdir)"
	@echo "rote-config executable    : $(DESTDIR)$(bindir)/rote-config"
	@echo
	@echo "To find out what compiler arguments you should use to"
	@echo "compile programs that use rote, use the rote-config"
	@echo "program (make sure $(DESTDIR)$(bindir) is in your path)."
	@echo "-----------------------------------------------------------"
        
librote.so.$(ROTE_VERSION): $(OBJECTS)
	$(CC) $(CFLAGS) -shared -o $@ -Wl,-soname=$(ROTE_SONAME) $(OBJECTS) $(LDFLAGS) $(LIBS)

.depends: $(SOURCES) $(HEADERS)
	$(CC) $(CFLAGS) -MM $(SOURCES) >.depends
	
-include .depends

clean:
	rm -f *.o .depends librote.so.*

pristine: clean
	rm -rf autom4te.cache configure config.status config.log Makefile rote-config

.PHONY: clean all install pristine