~ctrlproxy/ctrlproxy/trunk

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: jelmer
  • Date: 2003-10-18 22:02:02 UTC
  • Revision ID: jelmer@samba.org-20031018220202-6801a76318fb4d13
Update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
LIBS = @LIBS@ @PKG_LIBS@ @PKG_CFLAGS@
 
2
CC = @CC@
 
3
prefix = @prefix@
 
4
exec_prefix = @exec_prefix@
 
5
CFLAGS = @CFLAGS@ @PKG_CFLAGS@
 
6
INSTALL = @INSTALL@
 
7
bindir = @bindir@
 
8
docdir = @prefix@/doc/ctrlproxy
 
9
modulesdir = @libdir@/ctrlproxy
 
10
includedir = @includedir@
 
11
man1dir = @mandir@/man1
 
12
man5dir = @mandir@/man5
 
13
 
 
14
CFLAGS+=-ansi -Wall -DMODULESDIR=\"$(modulesdir)\"
 
15
OBJS = server.o line.o main.o state.o util.o transport.o hooks.o linestack.o
 
16
BINS = @BINS@
 
17
 
 
18
all: $(BINS)
 
19
        $(MAKE) -C mods all
 
20
        $(MAKE) -C doc all
 
21
 
 
22
ctrlproxy: $(OBJS)
 
23
        $(CC) $(LIBS) -rdynamic -o $@ $(OBJS)
 
24
 
 
25
printstats: printstats.o
 
26
        $(CC) -ltdb -o $@ $<
 
27
 
 
28
%.o: %.c
 
29
        $(CC) $(CFLAGS) -c $<
 
30
 
 
31
install: all install-dirs install-doc install-bin install-mods
 
32
install-dirs:
 
33
        $(INSTALL) -d $(DESTDIR)$(bindir)
 
34
        $(INSTALL) -d $(DESTDIR)$(man1dir)
 
35
        $(INSTALL) -d $(DESTDIR)$(man5dir)
 
36
        $(INSTALL) -d $(DESTDIR)$(includedir)
 
37
        $(INSTALL) -d $(DESTDIR)$(modulesdir)
 
38
        $(INSTALL) -d $(DESTDIR)$(docdir)
 
39
        $(MAKE) -C doc install
 
40
        
 
41
install-bin:
 
42
        $(INSTALL) ctrlproxy $(DESTDIR)$(bindir)
 
43
 
 
44
install-doc:
 
45
        $(INSTALL) ctrlproxy.h $(DESTDIR)$(includedir)
 
46
        $(INSTALL) AUTHORS $(DESTDIR)$(docdir)
 
47
        $(INSTALL) COPYING $(DESTDIR)$(docdir)
 
48
        $(INSTALL) TODO $(DESTDIR)$(docdir)
 
49
 
 
50
install-mods:
 
51
        $(MAKE) -C mods install
 
52
 
 
53
clean:
 
54
        rm -f *.o ctrlproxy printstats *~
 
55
        $(MAKE) -C mods clean
 
56
        $(MAKE) -C doc clean
 
57
 
 
58
distclean: clean
 
59
        rm -f Makefile build config.h ctrlproxy.pc ctrlproxy.spec *.log
 
60
        rm -rf autom4te.cache/ config.log
 
61
        $(MAKE) -C mods distclean
 
62
        $(MAKE) -C doc distclean