File: Makefile.sun

package info (click to toggle)
workman 1.3b-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,172 kB
  • ctags: 896
  • sloc: ansic: 11,084; makefile: 123; sh: 28
file content (175 lines) | stat: -rw-r--r-- 5,202 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# $Id: Makefile.sun,v 1.4 1997/12/23 09:45:18 dirk Exp $

#
# If you want to use gcc, tell make about it here.
#

CC = gcc
#CC = cc

#
# Uncomment the following if you're compiling on Solaris 2.x.
#
# If your system needs additional libraries, specify them on the "EXTRA_LIBS"
# line.
#
# If you don't want WorkMan to try to activate the SPARCstation 5 internal
# audio input so you get sound from the workstation, take -DCODEC off the
# SOL2 line.
#

SOL2 = -DSYSV -DCODEC
LIBLOC = -R$(LIBDIR)
EXTRA_LIBS = -lsocket

#
# Uncomment the following if you want fast database lookups using the
# Berkeley libdb code.  You can find libdb on ftp.cs.berkeley.edu in the
# /ucb/4bsd directory.  Make sure you adjust the last part of DBCFLAGS
# to match your system type as listed in libdb's PORT directory.
#

DBCFLAGS = -DLIBDB -Idb.1.85/PORT/include -Idb.1.85/PORT/sunos.5.2
DBLIB = db.1.85/PORT/sunos.5.2/libdb.a

#
# Set these to the locations of your XView include files and libraries.
#

INCDIR = $(OPENWINHOME)/include
LIBDIR = $(OPENWINHOME)/lib

#
# Set these to the directory names in which to install the software and
# help files.
#

BINDIR = $(OPENWINHOME)/bin
HLPDIR = $(OPENWINHOME)/lib/help

#
# Set this to the directory containing manual pages.  Manual pages will only
# be installed if you "make install.man".
#

MANDIR = $(OPENWINHOME)/man

#
# Set these to the manual sections (e.g. 1, 4, 5, l) for the program and
# database file manual pages, respectively.
#

PEXT = 1
DEXT = 5

# You shouldn't have to worry about anything from this line on.

############################################################################
# Parameters.

PROGRAM = workman
SOURCES.c = workman_stubs.c database.c cdinfo.c display.c setup.c scsi.c \
	ui_db_prefs.c index.c \
	ui_cdinfo.c plat_sun.c plat_hpux.c plat_linux.c plat_news.c \
	plat_bsd386.c plat_ultrix.c cdrom.c drv_toshiba.c drv_sony.c \
	plat_svr4.c plat_freebsd.c plat_osf1.c plat_irix.c

SOURCES.h = struct.h workman_ui.h ui_cdinfo.h setup.h workman_stubs.h \
        display.h config.h proto.h cdrom.h plat_.h database.h \
        index.h scsi.h cdinfo.h

OBJECTS = \
	$(SOURCES.c:%.c=%.o)

WBPROGRAM = workbone
WBSOURCES.c = workbone.c cdinfo.c \
        plat_sun.c plat_hpux.c plat_linux.c plat_news.c \
        plat_bsd386.c plat_ultrix.c cdrom.c scsi.c drv_toshiba.c drv_sony.c \
        plat_svr4.c plat_freebsd.c plat_osf1.c plat_irix.c index.c

WBSOURCES.h = struct.h workbone.h config.h proto.h cdrom.h plat_.h \
        database.h cdinfo.h

WBOBJECTS = \
        $(WBSOURCES.c:%.c=%.o)

# Compiler flags.

CFLAGS = -g
CPPFLAGS = -I$(INCDIR) $(SOL2)
LDFLAGS = -L$(LIBDIR) $(LIBLOC)
LDLIBS = -lxview -lolgx -lX11 $(EXTRA_LIBS) $(DBLIB) -ldl

# Standard targets.

all:	 $(PROGRAM) $(PROGRAM).doc workmandb.doc

$(PROGRAM): $(SOURCES.c) $(OBJECTS)
	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)

buildindex: buildindex.c
	$(CC) $(LDFLAGS) $(DBCFLAGS) buildindex.c $(DBLIB) -o $@

clean:
	$(RM) $(OBJECTS) *.BAK *.delta core

install: $(PROGRAM)
	cp $(PROGRAM) $(BINDIR)
	chmod 755 $(BINDIR)/$(PROGRAM)
	cp $(PROGRAM).info $(HLPDIR)
	chmod 644 $(HLPDIR)/$(PROGRAM).info

install.man: workman.man workmandb.man $(MANDIR)/man$(PEXT) $(MANDIR)/man$(DEXT)
	cp workman.man $(MANDIR)/man$(PEXT)/workman.$(PEXT)
	chmod 644 $(MANDIR)/man$(PEXT)/workman.$(PEXT)
	cp workmandb.man $(MANDIR)/man$(DEXT)/workmandb.$(DEXT)
	chmod 644 $(MANDIR)/man$(DEXT)/workmandb.$(DEXT)

display.o: display.c workman_ui.h
setup.o: setup.c workman_ui.h
workman_stubs.o: workman_stubs.c workman_ui.h
ui_cdinfo.o: ui_cdinfo.c workman_ui.h
# This next one isn't completely true, but close enough
$(OBJECTS): $(SOURCES.h)
$(WBOBJECTS): $(WBSOURCES.h)

index.o: index.c
	$(CC) $(CFLAGS) $(DBCFLAGS) -c $<

$(PROGRAM).doc: $(PROGRAM).man
	nroff -man $(PROGRAM).man > $(PROGRAM).doc
workmandb.doc: workmandb.man
	nroff -man workmandb.man > workmandb.doc

#
# These targets are for building the shar distribution.
#
shar: part01
tar: WorkMan.tar

ALLSOURCES= README $(SOURCES.h) \
	$(PROGRAM).man $(PROGRAM).doc $(SOURCES.c) workmandb.man workmandb.doc \
	bitmaps Makefile.svr4 HTML DOCS \
	$(PROGRAM).info Makefile Makefile.hpux Makefile.linux Imakefile \
	WorkMan.tmpl Makefile.osf1 buildindex.c
ALLFILES= $(ALLSOURCES) \
	bitmaps/loud.icon bitmaps/loud0.icon \
	bitmaps/loud1.icon bitmaps/loud2.icon bitmaps/loud3.icon \
	bitmaps/loud4.icon bitmaps/loud5.icon bitmaps/loud6.icon \
	bitmaps/phones bitmaps/phones0 bitmaps/phonesl1 bitmaps/phonesl2 \
	bitmaps/phonesl3 bitmaps/phonesr1 bitmaps/phonesr2 bitmaps/phonesr3 \
	bitmaps/sink0 bitmaps/sink1 bitmaps/sink2 bitmaps/sink3 \
	bitmaps/sink4 bitmaps/sink5 bitmaps/sink6 bitmaps/sink7 \
	bitmaps/eject.button bitmaps/ff.button \
	bitmaps/eject.button.small bitmaps/ff.button.small \
	bitmaps/icon bitmaps/iconmask bitmaps/pause.button \
	bitmaps/pause.button.small bitmaps/play.button.small \
	bitmaps/rew.button.small bitmaps/stop.button.small \
	bitmaps/play.button bitmaps/rew.button bitmaps/stop.button

part01: $(ALLFILES)
	makekit -s 50k -n part $(ALLFILES)
WorkMan.tar: $(ALLSOURCES)
	make docs
	(cd ..; tar cvFf workman/WorkMan.tar `(for i in $(ALLSOURCES); do \
		echo $$i; done) | sed 's@^@workman/@' | sort`)