home *** CD-ROM | disk | FTP | other *** search
Makefile | 1990-12-28 | 2.4 KB | 68 lines |
- # Makefile for saywha
- #
- # Copyright (C) 1990 by Jef Poskanzer.
- #
- # Permission to use, copy, modify, and distribute this software and its
- # documentation for any purpose and without fee is hereby granted, provided
- # that the above copyright notice appear in all copies and that both that
- # copyright notice and this permission notice appear in supporting
- # documentation. This software is provided "as is" without express or
- # implied warranty.
-
- # CONFIGURE: Define this if you want to enable the mail_editor option.
- # If you don't know what mail_editor is, don't worry about it.
- #ME_DEF = -DMAIL_EDITOR=\"/usr/local/bin/mail_editor\"
-
- # CONFIGURE: As far as I know, all implementations of NFS choke on
- # write-only files. Normally, say and wha use write-only files to record
- # the messages, but if your home directories are NFS-ized, this won't work.
- # In this case you have two options. One, set the WORLD_READABLE flag
- # below; this will make your .sayfiles world-readable, which is undesireable,
- # but it works. Two, don't set WORLD_READABLE flag, but after installation
- # manually make the say and wha executables set-group-id to tty, and
- # manually chgrp everyone's .sayfiles to tty, and keep on doing this
- # every time someone new starts using say/wha. Neither alternative is
- # very nice, but that's life. If you can think of a better solution,
- # please let me know.
- #NFS_DEF =
- NFS_DEF = -DWORLD_READABLE
-
- # CONFIGURE: Change these if you want to use something besides write(1).
- WR_DEF = -DWRITE=\"write\"
- WR_HD_DEF = -DWRITE_HEAD=\"Message\ from\ %s@%s\ on\ %s\ at\ %s\ ...\\n\"
- WR_TL_DEF = -DWRITE_TAIL=\"EOF\\n\"
-
- DEFINES = $(ME_DEF) $(NFS_DEF) $(WR_DEF) $(WR_HD_DEF) $(WR_TL_DEF)
-
- # CONFIGURE: Set compiler flags here if you like.
- CFLAGS = -O $(DEFINES)
- # CFLAGS = -g $(DEFINES)
-
- # CONFIGURE: Set linker flags here if you like.
- LDFLAGS = -s
- # LDFLAGS =
-
- LFLAGS = -hxz $(DEFINES)
-
- all: say wha
-
- say: say.c libsaywha.h libsaywha.o
- cc $(CFLAGS) say.c libsaywha.o $(LDFLAGS) -o say
-
- wha: wha.c libsaywha.h libsaywha.o
- cc $(CFLAGS) wha.c libsaywha.o $(LDFLAGS) -o wha
-
- libsaywha.o: libsaywha.c libsaywha.h
- cc $(CFLAGS) -c libsaywha.c
-
- lint:
- lint $(LFLAGS) say.c libsaywha.c
- lint $(LFLAGS) wha.c libsaywha.c
-
- clean:
- -rm -f *.o core say wha *.shar
-
- shar: saywha.shar
- saywha.shar: README Makefile say.c say.1 wha.c wha.1 libsaywha.c libsaywha.h
- shar -v -c -p X README Makefile say.c say.1 wha.c wha.1 libsaywha.c libsaywha.h > $@
-