home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-11-15 | 3.6 KB | 130 lines |
- # @(#)Makefile 1.32 11/8/92
-
- # Uncomment the following if you're compiling on Solaris 2. It adds an option
- # (-o) and changes the default device name of the CD-ROM.
- #SOL2 = -DSYSV
-
- # Set these to the locations of your XView include files and libraries.
- INCDIR = $(OPENWINHOME)/include
- LIBDIR = $(OPENWINHOME)/lib
-
- # If your linker supports the -R flag to set a default location for
- # shared libraries, uncomment this line.
- #LIBLOC = -R$(LIBDIR)
-
- # Set these to the directory names in which to install the software and
- # help files.
- BINDIR = $(OPENWINHOME)/bin
- HLPDIR = $(OPENWINHOME)/lib/help
-
- # And don't worry about anything from this line on.
-
- ############################################################################
- # Parameters.
-
- PROGRAM = workman
- SOURCES.c = workman_stubs.c database.c hardware.c cdinfo.c display.c setup.c
- SOURCES.h = struct.h workman_ui.h
-
- OBJECTS = \
- $(SOURCES.c:%.c=%.o)
-
- # Compiler flags.
-
- CFLAGS = -O
- CPPFLAGS = -I$(INCDIR) $(SOL2)
- LDFLAGS = -L$(LIBDIR) $(LIBLOC)
- LDLIBS = -lxview -lolgx -lX11 -ldl
- CC = cc
-
- # Standard targets.
-
- all: $(PROGRAM) $(PROGRAM).man workmandb.man
-
- $(PROGRAM): $(SOURCES.c) $(OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
-
- clean:
- $(RM) $(OBJECTS) *.BAK *.delta core
-
- install: $(PROGRAM)
- cp $(PROGRAM) $(BINDIR)
- chmod 755 $(BINDIR)/$(PROGRAM)
- cp $(PROGRAM).info $(HLPDIR)
- chmod 644 $(HLPDIR)/$(PROGRAM).info
-
- display.o: display.c workman_ui.h
- # This next one isn't completely true, but close enough
- $(OBJECTS): struct.h
-
- $(PROGRAM).man: $(PROGRAM).1
- nroff -man $(PROGRAM).1 > $(PROGRAM).man
- workmandb.man: workmandb.4
- nroff -man workmandb.4 > workmandb.man
-
- #
- # These targets are for building the shar distribution.
- #
- shar: part01
-
- ALLFILES= README ANSWERS INSTALLATION $(PROGRAM)_ui.h \
- $(PROGRAM).man $(PROGRAM).1 $(SOURCES.c) workmandb.man workmandb.4 \
- CHANGELOG struct.h bitmaps 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/icon bitmaps/iconmask bitmaps/pause.button \
- bitmaps/play.button bitmaps/rew.button bitmaps/stop.button \
- $(PROGRAM).info Makefile
-
- part01: $(ALLFILES)
- makekit -n part $(ALLFILES)
-
- #
- # The following builds a compressed tarfile for binary distribution.
- # It will require a little hacking to use on machines other than mine.
- #
- AUXDIR = /tmp
-
- AUXSTUFF = $(AUXDIR)/$(PROGRAM) $(AUXDIR)/ANSWERS \
- $(AUXDIR)/$(PROGRAM).info $(AUXDIR)/CHANGELOG $(AUXDIR)/$(PROGRAM).1 \
- $(AUXDIR)/$(PROGRAM).man $(AUXDIR)/workmandb.man $(AUXDIR)/workmandb.4
-
- tarfile: $(AUXDIR)/$(PROGRAM).tar.Z
-
- $(AUXDIR)/$(PROGRAM).tar.Z: $(AUXSTUFF)
- cd $(AUXDIR); tar cf - $(PROGRAM) \
- $(PROGRAM).info CHANGELOG $(PROGRAM).man $(PROGRAM).1 \
- workmandb.man workmandb.4 ANSWERS | \
- compress > $@
- chmod 644 $@
-
- $(AUXDIR)/$(PROGRAM): $(PROGRAM)
- cp $(PROGRAM) $@
- chmod 755 $@
- $(AUXDIR)/$(PROGRAM).info: $(PROGRAM).info
- cp $(PROGRAM).info $(AUXDIR)
- chmod 644 $@
- $(AUXDIR)/ANSWERS: ANSWERS
- cp ANSWERS $@
- chmod 644 $@
- $(AUXDIR)/CHANGELOG: CHANGELOG
- cp CHANGELOG $@
- chmod 644 $@
- $(AUXDIR)/workmandb.man: workmandb.man
- cp workmandb.man $@
- chmod 644 $@
- $(AUXDIR)/workmandb.4: workmandb.4
- cp workmandb.4 $@
- chmod 644 $@
- $(AUXDIR)/$(PROGRAM).man: $(PROGRAM).man
- cp $(PROGRAM).man $@
- chmod 644 $@
- $(AUXDIR)/$(PROGRAM).1: $(PROGRAM).1
- cp $(PROGRAM).1 $@
- chmod 644 $@
-