home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-07-17 | 5.0 KB | 125 lines |
- # This is the makefile for shop.
- # Note that the random function, long my_rand() in my_rand.c, is only
- # suitable if the size of a long on your system is 32 bits or more.
- # If not, just write a my_rand() in terms of whatever random-number
- # generation facility your environment offers.
- #
- # Note also that if you wish to update shop's database of phrases
- # and words, you may do so by editing the raw files (note the
- # noun file's format: in each pair of lines, the first is the
- # singular and the second is the plural) then giving the command
- #
- # make lists
-
- # Brian Rice rice@dg-rtp.dg.com $Date: 91/07/01 18:45:56 $
-
- INSTALL_DIR=/usr/local/bin
- # Set to be the directory into which you would
- # like the shop executable to be copied.
- SHOPLIB_DIR=/usr/local/lib/shop
- # Set to be the directory where indexed data files
- # should live. This must be an absolute pathname--
- # that is, it must have the same interpretation
- # regardless of what your current working directory
- # is. (Under UNIX, this would mean that the
- # pathname must begin with a slash.)
- PINDEX_DIR=/usr/local/bin
- # Set to be the directory in which you have
- # installed pindex (also posted to alt.sources).
- # If you haven't installed pindex yet, go do
- # it now!
- RAW_FILES_DIR=.
- # Set to be the directory where source data
- # files live.
- CFLAGS=
- # Compilation flags.
- LFLAGS=
- # Link editor flags.
- CC=/usr/bin/cc
- # Your C compiler.
- PWD_SUPPORTED=1
- # Set to 1 if your system supports uids,
- # delivered through the getpwent facility.
- # Otherwise, set to 0.
- DEFAULT_NAME="Mark McAuliffe"
- # Set this to a name to use for the -m
- # option if your system does not support getpwent.
- # (It is ignored if PWD_SUPPORTED is 1.)
- VERBOSE_GECOS=1
- # Set to 1 if the comment field of usernames at your
- # site has fields other than the user's real name--
- # for instance...
- # Brian Rice,,2486328,
- # If the comment field has nothing but names in
- # it, set VERBOSE_GECOS to 0.
- # Why is it called GECOS? Those pesky historical
- # reasons.
- GECOS_DELIMITERS=","
- # A list of all characters which serve to mark the
- # end of users' real names in the comment field at
- # your site.
- PATHNAME_SEP=/
- # The character which separates pathname components
- # at your site.
- COPY=cp
- # Your command for copying a file.
- EXECABLE=chmod 755
- # Your command for making a file executable.
- TOUCH=touch
- # Your command for touching a file.
- MKDIR=mkdir
- # Your command for creating a directory.
-
- # That's all the defines.
-
- NOUNFILE=$(SHOPLIB_DIR)$(PATHNAME_SEP)nouns.dat
- PLURALFILE=$(SHOPLIB_DIR)$(PATHNAME_SEP)plurals.dat
- ADJFILE=$(SHOPLIB_DIR)$(PATHNAME_SEP)adjs.dat
-
- RAWNOUNFILE=$(RAW_FILES_DIR)$(PATHNAME_SEP)nouns.raw
- RAWADJFILE=$(RAW_FILES_DIR)$(PATHNAME_SEP)adjs.raw
-
- install: makedirs lists shop
- makedirs:
- -$(MKDIR) $(INSTALL_DIR)
- -$(MKDIR) $(SHOPLIB_DIR)
- -$(TOUCH) makedirs
- lists: $(RAWNOUNFILE) $(RAWADJFILE)
- $(PINDEX_DIR)$(PATHNAME_SEP)pindex $(RAWADJFILE) $(ADJFILE)
- $(PINDEX_DIR)$(PATHNAME_SEP)pindex -2 $(RAWNOUNFILE) \
- $(NOUNFILE) $(PLURALFILE)
- -$(TOUCH) lists
- shop: shop.o capwords.o getcount.o getnth.o \
- getitem.o my_rand.o axatchar.o
- $(CC) $(LFLAGS) -o shop shop.o capwords.o getcount.o \
- getnth.o getitem.o axatchar.o my_rand.o
- -$(COPY) shop $(INSTALL_DIR)
- -$(EXECABLE) $(INSTALL_DIR)$(PATHNAME_SEP)shop
- shop.o: shop.c shop.h
- $(CC) $(CFLAGS) -c shop.c -DVERBOSE_GECOS=$(VERBOSE_GECOS) \
- -DPWD_SUPPORTED=$(PWD_SUPPORTED) -DDEFAULT_NAME=\"$(DEFAULT_NAME)\"
- capwords.o: capwords.c shop.h
- $(CC) $(CFLAGS) -c capwords.c \
- -DPWD_SUPPORTED=$(PWD_SUPPORTED)
- axatchar.o: axatchar.c
- $(CC) $(CFLAGS) -c axatchar.c \
- -DGECOS_DELIMITERS=\"$(GECOS_DELIMITERS)\" \
- -DPWD_SUPPORTED=$(PWD_SUPPORTED)
- getcount.o: getcount.c
- $(CC) $(CFLAGS) -c getcount.c
- getnth.o: getnth.c
- $(CC) $(CFLAGS) -c getnth.c \
- -DNOUN_FILE=\"$(NOUNFILE)\" \
- -DPLURAL_FILE=\"$(PLURALFILE)\" \
- -DADJ_FILE=\"$(ADJFILE)\"
- getitem.o: getitem.c shop.h
- $(CC) $(CFLAGS) -c getitem.c \
- -DNOUN_FILE=\"$(NOUNFILE)\" \
- -DPLURAL_FILE=\"$(PLURALFILE)\" \
- -DADJ_FILE=\"$(ADJFILE)\"
- my_rand.o: my_rand.c
- $(CC) $(CFLAGS) -c my_rand.c
-
- # RCS id of this makefile is $What: <@(#) Makefile,v 2.1> $.
-
-