File: Makefile

package info (click to toggle)
multimail 0.47-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 964 kB
  • ctags: 2,290
  • sloc: cpp: 16,444; makefile: 116; ansic: 87
file content (151 lines) | stat: -rw-r--r-- 4,190 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
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
#--------------------------
# MultiMail Makefile (top)
#--------------------------

include version

# General options (passed to mmail/Makefile and interfac/Makefile):

# With debug:
#OPTS = -g -Wall -pedantic -Wno-deprecated -Wno-char-subscripts

# Optimized, no debug:
# OPTS = -O2 -Wall -pedantic -Wno-deprecated -Wno-char-subscripts

# Edited for Debian - build with debugging symbols; make it possible to
# build without optimization
OPTS = -g -Wall -pedantic -Wno-deprecated -Wno-char-subscripts
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
OPTS += -O0
else
OPTS += -O2
endif

# Edited for Debian - make it possible to install unstripped binaries
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_OPTS = -s
else
INSTALL_OPTS =
endif

# Edited for Debian
DESTDIR =

# PREFIX is the base directory under which to install the binary and man 
# page; generally either /usr/local or /usr (or perhaps /opt...):

PREFIX = $(DESTDIR)/usr

# Delete command ("rm" or "del", as appropriate):

RM = rm -f

# The separator for multi-statement lines... some systems require ";",
# while others need "&&":

SEP = ;

# Any post-processing that needs doing:

POST =

#--------------------------------------------------------------
# Defaults are for the standard curses setup:

# CURS_INC specifies the location of your curses header file. Broken
# brackets (<, >) should be preceded by backslashes. Quotes (") should
# be preceded by *three* backslashes:

CURS_INC = \<curses.h\>

# CURS_DIR may also be necessary in some cases:

CURS_DIR = .

# CURS_LIB specifies the directory where the curses libraries can be found,
# if they're not in the standard search path:

CURS_LIB = .

# LIBS lists any "extra" libraries that need to be linked in:

LIBS = -lcurses

#--------------------------------------------------------------
# With ncurses installed beside the original curses, rather than
# replacing it -- for older Linux distros, etc.:

#CURS_INC = \<ncurses/curses.h\>
#CURS_DIR = /usr/include/ncurses
#CURS_LIB = /usr/local/lib
#LIBS = -lncurses

# For static linking (examples):

#LIBS = /usr/lib/libncurses.a
#LIBS = /opt/sfw/lib/libncurses.a

#--------------------------------------------------------------
# With ncurses installed in the user's home directory:

# Example with quotes (relative pathnames start from ./interfac):
#CURS_INC = \\\"../../ncurses-5.2/include/curses.h\\\"
#CURS_DIR = ../../ncurses-5.2/include
#CURS_LIB = ../ncurses-5.2/lib
#LIBS = -lncurses

#--------------------------------------------------------------
# With XCurses (PDCurses 2.7) in my home directory:

#CURS_INC = \\\"/home/wmcbrine/pdcurs27/curses.h\\\"
# Sneak some extra defines in through the back door:
#CURS_DIR = /home/wmcbrine/pdcurs27 -DXCURSES -DHAVE_PROTO
#CURS_LIB = /home/wmcbrine/pdcurs27/pdcurses
#LIBS = -L/usr/X11R6/lib \
#/home/wmcbrine/pdcurs27/pdcurses/libXCurses.a \
#-lXaw -lXmu -lXt -lX11 -lSM -lICE -lXext

#--------------------------------------------------------------
#--------------------------------------------------------------

HELPDIR = $(PREFIX)/share/man/man1
DOCDIR = $(PREFIX)/share/doc/multimail

all:	mm

mm-main:
	cd mmail $(SEP) $(MAKE) MM_MAJOR="$(MM_MAJOR)" \
		MM_MINOR="$(MM_MINOR)" OPTS="$(OPTS)" mm-main $(SEP) cd ..

intrfc:
	cd interfac $(SEP) $(MAKE) MM_MAJOR="$(MM_MAJOR)" \
		MM_MINOR="$(MM_MINOR)" OPTS="$(OPTS) -I$(CURS_DIR)" \
		CURS_INC="$(CURS_INC)" intrfc $(SEP) cd ..

mm:	mm-main intrfc
	$(CXX) -o mm mmail/*.o interfac/*.o -L$(CURS_LIB) $(LIBS)
	$(POST)

dep:
	cd interfac $(SEP) $(MAKE) CURS_INC="$(CURS_INC)" dep $(SEP) cd ..
	cd mmail $(SEP) $(MAKE) dep $(SEP) cd ..

clean:
	cd interfac $(SEP) $(MAKE) RM="$(RM)" clean $(SEP) cd ..
	cd mmail $(SEP) $(MAKE) RM="$(RM)" clean $(SEP) cd ..
	$(RM) mm

modclean:
	cd mmail $(SEP) $(MAKE) RM="$(RM)" modclean $(SEP) cd ..

install:
	install -d $(PREFIX)/bin $(HELPDIR) $(DOCDIR)
	install -c $(INSTALL_OPTS) mm $(PREFIX)/bin
	install -c -m 644 mm.1 $(HELPDIR)
	$(RM) $(HELPDIR)/mmail.1
#	ln $(HELPDIR)/mm.1 $(HELPDIR)/mmail.1
	install -m 644 README $(DOCDIR)
	install -m 644 TODO $(DOCDIR)
	install -m 644 FAQ $(DOCDIR)
	install -d $(DOCDIR)/colors
	cp -a colors/* $(DOCDIR)/colors