~ubuntu-branches/debian/sid/adjtimex/sid

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): James R. Van Zandt
  • Date: 2003-08-24 20:52:32 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20030824205232-5anied0z01t3urs6
Tags: 1.16-1
New upstream release (closes:Bug#204382)(closes:Bug#204377)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#### Start of system configuration section.             -*-makefile-*- ####
 
2
 srcdir = .
 
3
VPATH = .
 
4
 
 
5
VERSION=1.16
 
6
 
 
7
CFLAGS = -g -O2
 
8
prefix = /usr
 
9
man1dir=${prefix}/share/man/man1
 
10
exec_prefix = ${prefix}
 
11
bindir=/sbin
 
12
 
 
13
INSTALL=/usr/bin/install -c
 
14
CFLAGS = -Wall -t
 
15
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
16
        CFLAGS += -O0
 
17
else
 
18
        CFLAGS += -O2
 
19
endif
 
20
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
 
21
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
22
        INSTALL_PROGRAM += -s
 
23
endif
 
24
 
 
25
# Extension (not including `.') for the manual page filenames.
 
26
manext = 8
 
27
# Where to put the manual pages.
 
28
mandir = $(prefix)/man/man$(manext)
 
29
 
 
30
#### End of system configuration section. ####
 
31
 
 
32
SHELL = /bin/sh
 
33
 
 
34
SRC = adjtimex.c adjtimex.8 mat.c mat.h install-sh configure.in         \
 
35
 configure Makefile.in README README.ru adjtimex.lsm adjtimex.lsm.in    \
 
36
 COPYING COPYRIGHT ChangeLog
 
37
 
 
38
all: adjtimex adjtimex.lsm
 
39
 
 
40
adjtimex: adjtimex.c mat.o
 
41
        $(CC) $(CFLAGS) -I. -DVERSION=\"$(VERSION)\" -o adjtimex adjtimex.c  \
 
42
                mat.o -lm
 
43
 
 
44
adjtimex.lsm: adjtimex.lsm.in Makefile.in
 
45
        sed -e 's/@VERSION@/$(VERSION)/'                \
 
46
          -e "s/@DATE@/`date +%d%b%y|tr [a-z] [A-Z]`/"  \
 
47
          adjtimex.lsm.in >adjtimex.lsm
 
48
 
 
49
mat.o: mat.c
 
50
        $(CC) $(CFLAGS) -c mat.c
 
51
 
 
52
install: all
 
53
        $(INSTALL_PROGRAM) -g bin -m 755 -o root adjtimex $(bindir)/adjtimex
 
54
        -$(INSTALL) -g man -m 444 -o root $(srcdir)/adjtimex.8 \
 
55
                $(mandir)/adjtimex.$(manext)
 
56
 
 
57
uninstall:
 
58
        rm -f $(bindir)/adjtimex $(mandir)/adjtimex.$(manext)
 
59
 
 
60
clean: 
 
61
        rm -f core *.o
 
62
veryclean: clean
 
63
        rm -f adjtimex
 
64
 
 
65
shar: $(SRC)
 
66
        distname=adjtimex-$(VERSION);           \
 
67
        shar $(SRC) >$$distname.shar 
 
68
 
 
69
dist: $(SRC)
 
70
        distname=adjtimex-$(VERSION);                                         \
 
71
        rm -fr $$distname;                                                    \
 
72
        mkdir $$distname;                                                     \
 
73
        for file in $(SRC); do                                                \
 
74
          ln $$file $$distname/$$file                                         \
 
75
          || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
 
76
        done;                                                                 \
 
77
        chmod -R a+rX $$distname;                                             \
 
78
        tar -chz -f $$distname.tar.gz $$distname;                             \
 
79
        rm -fr $$distname