DESTDIR = /usr/local BINDIR = $(DESTDIR)/bin/X11 LIBDIR = $(DESTDIR)/lib/X11/app-defaults MANDIR = $(DESTDIR)/man/man1 BMDIR = $(DESTDIR)/include/X11/bitmaps #CC = gcc -ansi CC = gcc LD = gcc # SunOS 4.x CFLAG = -O -I/usr/X11R6/include LDFLAGS = -L/usr/X11R6/lib -L/usr/IXImd12x/lib INSTALL = /etc/install # Solaris 2.x CFLAGS = -D__EXTENSIONS__ -O -I/usr/openwin/include -I/usr/dt/include # -R: seriously brain damaged solaris CDE LDFLAGS = -R/usr/openwin/lib:/usr/dt/lib -L/usr/openwin/lib -L/usr/dt/lib INSTALL = /usr/local/bin/install # Linux CFLAGS = -O -m32 -I/usr/X11R6/include/ LDFLAGS = -m32 -I/usr/X11R6/lib/ INSTALL = install # IRIX #CC = cc -fullwarn #CFLAGS = -O -mips2 #LDFLAGS = #INSTALL = /usr/local/bin/install ########################################################################### LIBS = -lXm -lXmu -lXt -lX11 PROGRAM = mmotd SRCS = mmotd.c all: $(PROGRAM) .c: $(CC) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@ @echo "done" clean:; @rm -f $(PROGRAM) core install: all test -d $(BINDIR) || mkdir -p $(BINDIR) $(INSTALL) -c -s -o root -g sys -m 0755 $(PROGRAM) $(BINDIR)/$(PROGRAM) test -d $(LIBDIR) || mkdir -p $(LIBDIR) $(INSTALL) -c -o root -g sys -m 0644 Motd $(LIBDIR)/Motd test -d $(BMDIR) || mkdir -p $(BMDIR) $(INSTALL) -c -o root -g sys -m 0644 cps.bm $(BMDIR)/cps.bm install.man: test -d $(MANDIR) || mkdir -p $(MANDIR) $(INSTALL) -c -o root -g sys -m 0644 mmotd.man $(MANDIR)/mmotd.1