use my nice build system rather than custom makefiles
[apps/madtty.git] / madtty / Makefile.in
1 DEPTH=..
2 include $(DEPTH)/admin/header.mk
3
4 __LIB__ = madtty
5
6 madtty_SOURCES = inject.c inject_csi.c inject_csi.h madtty.h rote.c rote_keymap.c roteprivate.h
7
8 MADTTY_VERSION=@PACKAGE_VERSION@
9 MADTTY_SONAME=libmadtty.so.0
10
11 CC=@CC@
12 CFLAGS=@CFLAGS@ -Wall -W -fPIC
13 LIBS=@LIBS@
14 LDFLAGS=@LDFLAGS@
15 prefix=@prefix@
16 exec_prefix=@exec_prefix@
17 libdir=@libdir@
18 includedir=@includedir@
19 bindir=@bindir@
20
21 #all: libmadtty.so.$(MADTTY_VERSION)
22
23 install: all
24         mkdir -p $(DESTDIR)$(includedir)/madtty
25         rm -f $(DESTDIR)$(includedir)/madtty/*.h
26         cp madtty.h $(DESTDIR)$(includedir)/madtty
27         mkdir -p $(DESTDIR)$(libdir)
28         cp libmadtty.so.$(MADTTY_VERSION) $(DESTDIR)$(libdir)
29         cd $(DESTDIR)$(libdir) && ln -sf libmadtty.so.$(MADTTY_VERSION) libmadtty.so
30         cd $(DESTDIR)$(libdir) && ln -sf libmadtty.so.$(MADTTY_VERSION) $(MADTTY_SONAME)
31         mkdir -p $(DESTDIR)$(libdir)/pkgconfig
32         cp madtty.pc $(DESTDIR)$(libdir)/pkgconfig
33         @echo "-----------------------------------------------------------"
34         @echo "MADTTY - the Mad tty Emulation Library v$(MADTTY_VERSION)"
35         @echo
36         @echo "Include files installed at: $(DESTDIR)$(includedir)"
37         @echo "Library files installed at: $(DESTDIR)$(libdir)"
38         @echo "-----------------------------------------------------------"
39
40 libmadtty.so.$(MADTTY_VERSION): $(OBJECTS)
41         $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname=$(MADTTY_SONAME) $(OBJECTS) $(LDFLAGS) $(LIBS)
42
43 .depends: $(SOURCES) $(HEADERS)
44         $(CC) $(CFLAGS) -MM $(SOURCES) >.depends
45
46 -include .depends
47
48 clean::
49         libmadtty.so.*
50
51 distclean::
52         rm -rf autom4te.cache configure config.status config.log Makefile madtty.pc
53
54 include $(DEPTH)/admin/footer.mk