File: Makefile

package info (click to toggle)
postal 0.62.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 476 kB
  • ctags: 445
  • sloc: cpp: 2,902; sh: 289; ansic: 258; makefile: 86
file content (54 lines) | stat: -rw-r--r-- 1,427 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
EXE=postal postal-list rabid
MAN8=postal-list.8 postal.8 rabid.8

all: $(EXE)

prefix=/home/rjc/debian/postal-0.62/debian/postal/usr
eprefix=${prefix}
WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual -Woverloaded-virtual -pedantic -ffor-scope

CXX=g++ $(CFLAGS) -O2 -g $(WFLAGS)
CC=gcc $(CFLAGS) -O2 -g $(WFLAGS)

INSTALL=/usr/bin/install -c

TESTEXE=ex-test
BASEOBJS=expand.o userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o 
LFLAGS=-lstdc++  -lssl -lcrypto -lpthread


ALLOBJS=$(BASEOBJS) smtp.o client.o

postal: postal.cpp $(BASEOBJS) postal.h smtp.o
	$(CXX) postal.cpp $(BASEOBJS) smtp.o -o postal $(LFLAGS)

rabid: rabid.cpp $(BASEOBJS) postal.h client.o
	$(CXX) rabid.cpp $(BASEOBJS) client.o -o rabid $(LFLAGS)

ex-test: ex-test.cpp expand.o
	$(CXX) ex-test.cpp expand.o -o ex-test $(LFLAGS)

postal-list: postal-list.cpp expand.o
	$(CXX) postal-list.cpp expand.o -o postal-list $(LFLAGS)

install-bin: $(EXE)
	mkdir -p $(eprefix)/sbin
	${INSTALL} -s $(EXE) $(eprefix)/sbin

install: install-bin
	mkdir -p ${prefix}/man/man8
	${INSTALL} -m 644 $(MAN8) ${prefix}/man/man8

%.o: %.cpp %.h postal.h
	$(CXX) -c $<

%.o: %.c %.h
	$(CC) -c $<

clean:
	rm -f $(EXE) $(TESTEXE) $(ALLOBJS) md5.o build-stamp install-stamp
	rm -rf debian/tmp core debian/*.debhelper
	rm -f debian/{substvars,files} config.log

realclean: clean
	rm -f config.* Makefile postal.spec sun/pkginfo