Debian Codegraph @

Makefile

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 #--------------------------
2 # MultiMail Makefile (top)
3 #--------------------------
4
5 msrc = mmail
6 isrc = interfac
7
8 # General options (passed to mmail/Makefile and interfac/Makefile). POST
9 # is for any post-processing that needs doing.
10
11 ifeq ($(DEBUG),Y)
•12 CXXFLAGS += -g -Wall -pedantic
13 else
•14 CXXFLAGS += -O2 -Wall -pedantic
15 POST = strip mm$(E)
16 endif
17
18 # PREFIX is the base directory under which to install the binary and man
19 # page; generally either /usr/local or /usr (or perhaps /opt...).
20
•21 PREFIX = $(DESTDIR)/usr
22
23 #--------------------------------------------------------------
24 # Defaults are for the standard curses setup:
25
26 # CURS_DIR specifies the directory with curses.h, if it's not in the
27 # include path. LIBS lists any "extra" libraries that need to be linked
28 # in, including the curses library. RM is the Delete command ("rm" or
29 # "del", as appropriate), and SEP is the separator for multi-statement
30 # lines... some systems require ";", while others need "&&".
31
32 ifeq ($(OS),Windows_NT)
33 CURS_DIR = /pdcurses
34 LIBS = $(CURS_DIR)/wincon/pdcurses.a
35 RM = del
36 SEP = &&
37 E = .exe
38 else
39 CURS_DIR = .
40 LIBS = -lcurses
41 RM = rm -f
42 SEP = ;
43 E =
44 endif
45
46 #--------------------------------------------------------------
47 # With PDCurses for X11:
48
49 ifeq ($(SYS),X11)
50 CURS_DIR = $(shell xcurses-config --cflags | cut -c 3-)
51 LIBS = $(shell xcurses-config --libs)
52 endif
53
54 #--------------------------------------------------------------
55 # With PDCurses for SDL:
56
57 ifeq ($(SYS),SDL)
58 CURS_DIR = /Users/wmcbrine/pdsrc/PDCurses
59 LIBS = $(CURS_DIR)/sdl2/pdcurses.a $(shell sdl2-config --libs)
60 endif
61
62 #--------------------------------------------------------------
63 # For DJGPP:
64
65 ifeq ($(SYS),DOS)
66 CURS_DIR = /pdcurses
67 LIBS = $(CURS_DIR)/dos/pdcurses.a
68 RM = del
69 SEP = ;
70 E = .exe
71 POST = strip mm.exe; exe2coff mm.exe; copy /b \
72 c:\djgpp\bin\cwsdstub.exe+mm mm.exe; del mm
73 endif
74
•75 HELPDIR = $(PREFIX)/share/man1
76 O = o
77
78 .SUFFIXES: .cc
79 .PHONY: clean dep install
80
81 all: mm$(E)
82
83 MOBJS = misc.o resource.o mmail.o driverl.o filelist.o area.o letter.o \
84 read.o compress.o pktbase.o bw.o qwk.o omen.o soup.o opx.o
85
86 IOBJS = mmcolor.o mysystem.o isoconv.o basic.o interfac.o packet.o \
87 arealist.o letterl.o letterw.o lettpost.o ansiview.o addrbook.o \
88 tagline.o help.o main.o
89
90 $(MOBJS) : %.o: $(msrc)/%.cc
•91 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
92
93 $(IOBJS) : %.o: $(isrc)/%.cc
•94 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(CURS_DIR) -c $<
95
96 mm$(E): $(MOBJS) $(IOBJS)
•97 $(CXX) -o mm$(E) $(MOBJS) $(IOBJS) $(LDFLAGS) $(LIBS)
98 $(POST)
99
100 dep:
101 $(CXX) -MM $(msrc)/*.cc | sed s/"\.o"/"\.\$$(O)"/ > depend
102 $(CXX) -I$(CURS_DIR) -MM $(isrc)/*.cc | sed s/"\.o"/"\.\$$(O)"/ >> depend
103
104 clean:
105 $(RM) *.o
106 $(RM) mm$(E)
107
108 install::
•109 install -d $(PREFIX)/bin $(HELPDIR)
110 install -c $(INSTALL_OPTS) mm $(PREFIX)/bin
111 install -c -m 644 mm.1 $(HELPDIR)
112 $(RM) $(HELPDIR)/mmail.1
113 ln $(HELPDIR)/mm.1 $(HELPDIR)/mmail.1
114
115 include depend