earlybrowserreborn - Rev 1

Subversion Repositories:
Rev:
# Copyright 1990,91 GROUPE BULL -- See licence conditions in file COPYRIGHT
#
# XPM Makefile - Arnaud LE HORS
#

AR = ar r
CC = cc
RANLIB = ranlib
RM = rm -f
# on sysV, define this as cp.
INSTALL = install -c

DVI2PS = dvi2ps

CDEBUGFLAGS= -O

# if your system doesn't provide strcasecmp add -DNEED_STRCASECMP
# if your system doesn't provide pipe remove -DZPIPE
DEFINES = -DZPIPE

DESTBINDIR=/usr/local/bin/X11
DESTLIBDIR=/usr/local/lib/X11
DESTINCLUDEDIR=$(DESTLIBDIR)/xpm-include
MANDIR=/usr/man/manl

LIBDIRS= -L/usr/lib/X11 -L.
LIBS= -lXpm -lXext -lXt -lX11
OBJS= data.o create.o visual.o misc.o rgb.o scan.o parse.o \
      XpmWrFFrP.o XpmRdFToP.o XpmCrPFData.o XpmCrDataFP.o \
      XpmWrFFrI.o XpmRdFToI.o XpmCrIFData.o XpmCrDataFI.o

CFLAGS= $(CDEBUGFLAGS) $(DEFINES)

all: sxpm

clean: 
        $(RM) *.o sxpm libXpm.a

sxpm: libXpm.a sxpm.o
        $(CC) $(CFLAGS) sxpm.o $(LIBDIRS) $(LIBS) -o sxpm

libXpm.a: $(OBJS)
        $(AR) libXpm.a $(OBJS)
        $(RANLIB) libXpm.a

install: install.lib install.sxpm install.man

install.lib:
        $(INSTALL) -m 0664 libXpm.a $(DESTLIBDIR)
        cd $(DESTLIBDIR); $(RANLIB) libXpm.a
        -mkdir $(DESTINCLUDEDIR)
        -chmod ugo+rx $(DESTINCLUDEDIR)
        $(INSTALL) -m 0444 xpm.h $(DESTINCLUDEDIR)

install.sxpm:
        $(INSTALL) -m 0755 sxpm $(DESTBINDIR)

install.man:
        $(INSTALL) -m 0644 sxpm.man $(MANDIR)/sxpm.l

doc:    xpm.ps

xpm.ps: xpm.dvi
        $(DVI2PS) xpm > xpm.ps

xpm.dvi: xpm.tex
        latex xpm
        latex xpm

print:  xpm.ps
        lpr xpm.ps

# Other dependencies.
mio.o:       xpmP.h
create.o:    xpmP.h
visual.o:    xpmP.h
free.o:      xpmP.h
rgb.o:       xpmP.h
XpmWrPixF.o:   xpmP.h
XpmRdPixF.o:   xpmP.h
XpmCrPFData.o: xpmP.h
sxpm.o:      xpm.h