# Makefile for xwpick

  PROGRAM = xwpick

# Your choice of C compiler, for example:
  CC = cc
# CC = gcc

# Your choice of C compiler options, for example:
  COPTS = -O
# COPTS = -O -Aa -D_HPUX_SOURCE
 
# X11 include directory, for example:
  XINCDIR = .
# XINCDIR = /usr/include/X11R6
 
# X11 library directory, for example:
  XLIBDIR = .
# XLIBDIR = /usr/lib/X11R6

# X11 library files, for example:
  XLIB = -lX11
# XLIB = -lX11 -ldnet_stud

# change INSTALL_PATH to the directory in which you want xwpick installed
  INSTALL_PATH = /usr/bin/X11

# change MAN_PATH to the directory in which you want man page installed
  MAN_PATH = /usr/man/man1

# change MAN_EXT to the extention which man page should have
  MAN_EXT = 1

  OBJS = xwpick.o ImgToolKit.o \
         PCXencode.o GIFencode.o PICTencode.o PPMencode.o \
         PSencode.o PS_LZWencode.o

all: $(PROGRAM)
	
$(PROGRAM): $(OBJS)
	$(CC) $(COPTS) -L$(XLIBDIR) -o $(PROGRAM) $(OBJS) $(XLIB)
$(PROGRAM).o: $(PROGRAM).c
	$(CC) -c $(COPTS) -I$(XINCDIR) $(PROGRAM).c
ImgToolKit.o: ImgToolKit.c
	$(CC) -c $(COPTS) -I$(XINCDIR) ImgToolKit.c
.c.o:
	$(CC) -c $(COPTS) $*.c

install:
	install -c xwpick $(INSTALL_PATH)

install.man:
	install -c -m 644 xwpick.man $(MAN_PATH)/xwpick.$(MAN_EXT)

clean: 
	rm -f $(OBJS) $(PROGRAM)
