File: Makefile.in

package info (click to toggle)
chrony 1.21z-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 2,080 kB
  • ctags: 2,375
  • sloc: ansic: 14,831; yacc: 858; sh: 588; perl: 426; makefile: 148
file content (158 lines) | stat: -rw-r--r-- 5,648 bytes parent folder | download | duplicates (3)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
##################################################
#
# $Header: /cvs/src/chrony/Makefile.in,v 1.48 2003/09/19 22:48:26 richard Exp $
#
# =======================================================================
#
# chronyd/chronyc - Programs for keeping computer clocks accurate.
# 
# Copyright (C) Richard P. Curnow  1997-2003
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
# 
# 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
#
# =======================================================================
#
# Makefile template

INSTALL_PREFIX=@INSTALL_PREFIX@
MANDIR=@MANDIR@
INFODIR=@INFODIR@

CC = @CC@
CCWARNFLAGS = @CCWARNFLAGS@
OPTFLAGS = @CFLAGS@ @EXTRA_DEFS@

DESTDIR=

OBJS = util.o sched.o regress.o local.o \
	sys.o main.o ntp_io.o ntp_core.o ntp_sources.o \
	sources.o sourcestats.o reference.o \
	logging.o conf.o cmdmon.o md5.o keys.o \
	nameserv.o acquire.o manual.o addrfilt.o \
	cmdparse.o mkdirpp.o rtc.o pktlength.o clientlog.o \
	broadcast.o

EXTRA_OBJS=@EXTRA_OBJECTS@

CLI_OBJS = client.o md5.o nameserv.o getdate.o cmdparse.o \
           pktlength.o

SRCS = $(patsubst %.o,%.c,$(OBJS))
EXTRA_SRCS = $(patsubst %.o,%.c,$(EXTRA_OBJS))

CLI_SRCS = $(patsubst %.o,%.c,$(CLI_OBJS))

LIBS = @LIBS@

EXTRA_LIBS=@EXTRA_LIBS@
EXTRA_CLI_LIBS=@EXTRA_CLI_LIBS@

DEFS=@SYSDEFS@

CFLAGS = $(CCWARNFLAGS) $(OPTFLAGS)

# Until we have a main procedure we can link, just build object files
# to test compilation

all : chronyd chronyc

chronyd : $(OBJS) $(EXTRA_OBJS)
	$(CC) $(OPTFLAGS) -o chronyd $(OBJS) $(EXTRA_OBJS) $(LIBS) $(EXTRA_LIBS)

chronyc : $(CLI_OBJS)
	$(CC) $(OPTFLAGS) -o chronyc $(CLI_OBJS) @READLINE_LINK@ $(LIBS) $(EXTRA_CLI_LIBS)

client.o : client.c
	$(CC) $(CFLAGS) $(DEFS) @READLINE_COMPILE@ -c $<

.depend : 
	gcc -MM $(SRCS) $(EXTRA_SRCS) > .depend

distclean :
	-rm -f *.o *.s chronyc chronyd core options.h Makefile *~

clean :
	-rm -f *.o *.s chronyc chronyd core *~

version.h : version.txt
	./mkversion


# For install, don't use the install command, because its switches
# seem to vary between systems.

install: chronyd chronyc
	[ -d $(DESTDIR)$(INSTALL_PREFIX) ] || mkdir -p $(DESTDIR)$(INSTALL_PREFIX)
	[ -d $(DESTDIR)$(INSTALL_PREFIX)/sbin ] || mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/sbin
	[ -d $(DESTDIR)$(INSTALL_PREFIX)/bin ] || mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/bin
	[ -d $(DESTDIR)$(INSTALL_PREFIX)/share/doc ] || mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share/doc
	[ -d $(DESTDIR)$(MANDIR)/man1 ] || mkdir -p $(DESTDIR)$(MANDIR)/man1
	[ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5
	[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
	[ -d $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony ] || mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony
	if [ -f $(DESTDIR)$(INSTALL_PREFIX)/sbin/chronyd ]; then rm -f $(DESTDIR)$(INSTALL_PREFIX)/sbin/chronyd ; fi
	if [ -f $(DESTDIR)$(INSTALL_PREFIX)/bin/chronyc ]; then rm -f $(DESTDIR)$(INSTALL_PREFIX)/bin/chronyc ; fi
	cp chronyd $(DESTDIR)$(INSTALL_PREFIX)/sbin/chronyd
	chmod 555 $(DESTDIR)$(INSTALL_PREFIX)/sbin/chronyd
	cp chronyc $(DESTDIR)$(INSTALL_PREFIX)/bin/chronyc
	chmod 555 $(DESTDIR)$(INSTALL_PREFIX)/bin/chronyc
	cp chrony.txt $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
	chmod 444 $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
	cp COPYING $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/COPYING
	chmod 444 $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/COPYING
	cp README $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/README
	chmod 444 $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/README
	cp chrony.1 $(DESTDIR)$(MANDIR)/man1
	chmod 444 $(DESTDIR)$(MANDIR)/man1/chrony.1
	cp chronyc.1 $(DESTDIR)$(MANDIR)/man1
	chmod 444 $(DESTDIR)$(MANDIR)/man1/chronyc.1
	cp chronyd.8 $(DESTDIR)$(MANDIR)/man8
	chmod 444 $(DESTDIR)$(MANDIR)/man8/chronyd.8
	cp chrony.conf.5 $(DESTDIR)$(MANDIR)/man5
	chmod 444 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5

%.o : %.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

%.s : %.c
	$(CC) $(CFLAGS) $(DEFS) -S $<

main.o logging.o client.o : version.h

# makeinfo v4 required to generate plain text and html
MAKEINFO:=makeinfo

install-docs : docs
	[ -d $(DESTDIR)$(INSTALL_PREFIX)/share/doc ] || mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share/doc
	cp chrony.txt $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
	chown root $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
	chmod 444 $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
	cp chrony.html $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.html
	chown root $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.html
	chmod 444 $(DESTDIR)$(INSTALL_PREFIX)/share/doc/chrony/chrony.html
	[ -d $(DESTDIR)$(INFODIR) ] || mkdir -p $(DESTDIR)$(INFODIR)
	cp chrony.info* $(DESTDIR)$(INFODIR)
	chown root $(DESTDIR)$(INFODIR)/chrony.info*
	chmod 444 $(DESTDIR)$(INFODIR)/chrony.info*

docs : chrony.txt chrony.html chrony.info

chrony.txt : chrony.texi
	$(MAKEINFO) --no-headers --number-sections -o chrony.txt chrony.texi

chrony.html : chrony.texi
	$(MAKEINFO) --no-split --html --number-sections -o chrony.html chrony.texi

chrony.info : chrony.texi
	$(MAKEINFO) chrony.texi