File: Makefile

package info (click to toggle)
coolmail 1.3-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 196 kB
  • ctags: 230
  • sloc: ansic: 1,512; makefile: 90
file content (97 lines) | stat: -rwxr-xr-x 3,242 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
#!/usr/bin/make
# Makefile for coolmail
#
############################################################################
#
# TO BUILD COOLMAIL:
# ------------------
# (1) If necessary, edit CFLAGS, LINK, INCLUDES, LIB_DIRS, and BINDIR.
# (2) Type `make' in this directory to build coolmail.
# (3) Type `make install' in this directory to copy it to your BINDIR.
#
############################################################################

# Uncomment this if CC is not in your environment.  Change it if necessary.
CC = gcc

# Please verify that the following six lines are correct.  CFLAGS is
# a set of options for your C compiler, LINK is the linker command you
# want to use.  (This may be your C compiler, because most C compilers
# know how to invoke the linker.)  INCLUDES is any include path that your
# compiler should search in addition to its default paths.  LIB_DIRS tells
# your linker where to find the libraries it will need, and BINDIR and
# MANDIR specify the places to install the binary executable and manpage
# files for coolmail when you type `make install'.
CFLAGS   = 
LINK     = $(CC)
INCLUDES = -I/usr/X11R6/include
LIB_DIRS = -L/usr/X11R6/lib
BINDIR   = /usr/local/bin
MANDIR   = /usr/local/man/man1

# Comment these out if you can't or don't want to use the digitized audio
# feature.
AUDIO        = -DAUDIO
AUDIO_MODULE = audio.o

#### You really don't need to read past this point. ####

LIBS  = $(LIB_DIRS) -lXt -lX11 -lm -lXext -lSM -lICE
COPTS = $(CFLAGS) $(AUDIO)

all: coolmail
	# Done.

new:
	rm -f *.o coolmail core

clean:
	rm -f *.o core

install:
	@if [ -w $(BINDIR) ] ; then \
	   echo "Attempting to install coolmail executable." ; \
	   if [ -f $(BINDIR)/coolmail ] ; then \
	      echo "Existing copy of coolmail will be OVERWRITTEN." ; \
	   fi; \
	   echo "cp coolmail $(BINDIR)/coolmail" ; \
	   cp coolmail $(BINDIR)/coolmail ; \
	else \
	echo "ERROR:  Unable to write to $(BINDIR)." ; \
	   echo "Please check that it exists and that you have write access" ; \
	   echo "to it." ; \
	fi;
	@if [ -w $(MANDIR) ] ; then \
	   echo "Attempting to install coolmail man page." ; \
	   echo "cp coolmail.man $(MANDIR)/coolmail.1" ; \
	   cp coolmail.man $(MANDIR)/coolmail.1 ; \
	   echo "OK.  You may wish to update the whatis database" ; \
           echo "for $(MANDIR)." ; \
	else \
	echo "ERROR:  Unable to write to $(MANDIR)." ; \
	   echo "Please check that it exists and that you have write access" ; \
	   echo "to it." ; \
	fi;

coolmail: coolmail.o display_list.o render1.o colors.o $(AUDIO_MODULE)
	$(LINK) coolmail.o display_list.o render1.o  colors.o $(AUDIO_MODULE)\
                $(LIBS) -o coolmail 

display_list.o: system/X11/display_list.c display_list.h render1.h \
                system/X11/colors.h
	$(CC) $(COPTS) $(INCLUDES) system/X11/display_list.c -c

r1_sub.o: r1_sub.c display_list.h render1.h
	$(CC) $(COPTS) $(INCLUDES) r1_sub.c -c

coolmail.o: coolmail.c mailbox.h render1.h
	$(CC) $(COPTS) $(INCLUDES) coolmail.c -c

render1.o: render1.c display_list.h render1.h
	$(CC) $(COPTS) $(INCLUDES) render1.c -c

colors.o: system/X11/colors.c system/X11/colors.h
	$(CC) $(COPTS) $(INCLUDES) system/X11/colors.c -c

audio.o: audio.c
	$(CC) $(COPTS) $(INCLUDES) audio.c -c