File: Makefile

package info (click to toggle)
splitdigest 2.3-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 144 kB
  • ctags: 103
  • sloc: ansic: 609; makefile: 106
file content (107 lines) | stat: -rw-r--r-- 3,110 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
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
# Makefile for splitdigest
# Copyright (c) 1994,1995 by Christopher Heng. All rights reserved.

# $Id: Makefile,v 2.9 1995/07/08 10:04:45 chris Released $


CC = gcc
DBG=-O2 -fomit-frame-pointer -s
CFLAGS = $(DBG)
LDFLAGS = $(DBG)

# You may define the following to change the default names in
# splitdigest.h
# Note that things defined here supercedes those defined in splitdigest.h
#	DEFCOMPRESS	default name of the compression program to use.
#	COMPRESSARG	default argument for compression program.
#	DEFTOCOMPRESS	whether to compress the output file by default.
#	DEFCONFIG	default pathname of the configuration file.
#			If you change this, change the macro LIBDIR below
#			as well.
#	MAXCFTABLE	maximum number of digest types in the config file.
#	OLDMETHOD	If you want the old method of not undigesting by
#			default.
# These supercedes macros in cftables.h
#	SEPCHAR		separator character between messages in a digest
DEFCOMPRESS = /usr/bin/gzip
COMPRESSARG = -9
DEFTOCOMPRESS = 0
DEFCONFIG = /etc/splitdigest.config
MAXCFTABLE = 128
MAXSCANFBUF = 512
SEPCHAR	= -
OLDMETHOD = 0
DEFINES = -DDEFCOMPRESS=\"$(DEFCOMPRESS)\" -DCOMPRESSARG=\"$(COMPRESSARG)\"\
	-DDEFTOCOMPRESS=$(DEFTOCOMPRESS) -DDEFCONFIG=\"$(DEFCONFIG)\"\
	-DMAXCFTABLE=$(MAXCFTABLE) -DSEPCHAR=\'$(SEPCHAR)\' \
	-DOLDMETHOD=$(OLDMETHOD)

BINDIR = $(DESTDIR)/usr/bin
MANDIR = $(DESTDIR)/usr/man/man1
LIBDIR = $(DESTDIR)/usr/lib

INSTALL = install -m 755 -o root -g root
INSTALLDATA = install -m 644 -o root -g root
INSTALLDIR = install -m 755 -o root -g root -d
CONFIGDIR = $(DESTDIR)/etc

# -----------------------------------------------------------------------
# End of configurable section of the Makefile.
# You should not need to modify anything below this line
# ------------------------------------------------------------------------

OBJS = main.o cftables.o uncatfile.o

FILES = ANNOUNCEMENT COPYING CHANGES README Makefile \
        main.c uncatfile.c cftables.c splitdigest.h version.h cftables.h \
        splitdigest.1 splitdigest.config splitdigest.lsm

SDVERSTR = -nR2_3
SDVERNUM = 2.3
RCSSTATE = -sReleased

all: splitdigest

splitdigest: $(OBJS)
	$(CC) $(LDFLAGS) -o splitdigest $(OBJS)

install: all
	$(INSTALLDIR) $(BINDIR)
	$(INSTALLDIR) $(MANDIR)
	$(INSTALLDIR) $(CONFIGDIR)
	$(INSTALL) splitdigest $(BINDIR)/
	$(INSTALLDATA) splitdigest.1 $(MANDIR)/
	$(INSTALLDATA) splitdigest.config $(CONFIGDIR)/

clean:
	rm -f *.o splitdigest

main.o: main.c splitdigest.h version.h cftables.h
	$(CC) $(CFLAGS) $(DEFINES) -o main.o -c main.c

cftables.o: cftables.c splitdigest.h cftables.h
	$(CC) $(CFLAGS) $(DEFINES) -o cftables.o -c cftables.c

uncatfile.o: uncatfile.c splitdigest.h cftables.h
	$(CC) $(CFLAGS) $(DEFINES) -o uncatfile.o -c uncatfile.c

checkin:
	ci $(SDVERSTR) -u$(RCSVERNUM) $(RCSSTATE) $(FILES)

checkout:
	co $(FILES)

develcheckout:
	co -l $(FILES)

mytar:	all
	cd ..;\
	tar cvvf spdig-$(SDVERNUM).tar splitdigest-$(SDVERNUM) ;\
	gzip -9 spdig-$(SDVERNUM).tar

dist:	mytar
	rm -r RCS
	rm *.o
	cd ..;\
	tar cvvf splitdigest-$(SDVERNUM).tar splitdigest-$(SDVERNUM) ;\
	gzip -9 splitdigest-$(SDVERNUM).tar