#========================================================================
# TITLE:	QMR 
# MODULE:	makefile
# BY:		Ross C LINDER	(c) 1994 All rights reserved
#
# X11-QMR is Copyright (c) 1994 of Ross C Linder. X11-QMR is not public
# domain. Permission is granted to use and distribute X11-QMR freely.
# 
# The only restriction is that you may not distibute modified source
# code, and that you do not attempt to prevent others from having free
# access to the source.
#
# @(#)makefile	$Revision: 1.1 $	$Date: 1994/07/24 17:49:11 $
#========================================================================

#.uil.uid:
#	uil -o $*.uid $*.uil

CC = cc
CFLAGS = -O6 -DSYSV

# HP-UX CFLAGS (use CC = c89)
# CFLAGS = -DHPUX -I/usr/include/X11R5 -I/usr/include/Motif1.2 \
#	   -D_INCLUDE_AES_SOURCE

# Linux dynamic libraries..
LIBS = -lMrm -lXm -lXt -lXext -lX11

# Linux static libraries
ST_LIBS = -lMrm /usr/lib/libXm.a -lXt -lXext -lX11

# HP-UX 9.x
# LIBS = -L /usr/lib/Motif1.2 -L /usr/lib/X11R5\
#	 -lMrm -lXm -lXt -lX11 -lm -lmalloc -lPW

# SCO-ODT
# LIBS = -lMrm -lXtXm_s -lX11_s -lXmu -lsocket -lm -lmalloc -lPW


OBJS = qmr.o help.o unpack.o reply.o tagline.o qwk.o util.o

#
# For systems that don't need the static/dynamic irritation
#all:	mkhelp qmr qmr.uid

#
# For Linux with the static/dynamic OSF conflict
#
all:	mkhelp qmr.dynamic qmr qmr.uid

mkhelp:	mkhelp.o
	$(CC) $(CFLAGS) -o mkhelp mkhelp.o

help.c:		help.dat
		mkhelp

qmr.dynamic:	$(OBJS)
		$(CC) $(CFLAGS) -o qmr.dynamic $(OBJS) $(LIBS)
		strip qmr.dynamic

qmr:		$(OBJS)
		$(CC) $(CFLAGS) -o qmr $(OBJS) $(ST_LIBS)
		 strip qmr

qmr.uid:	qmr.uil
		uil -o qmr.uid qmr.uil

clean:
		rm -f *.o *.uid help.c qmr qmr.dynamic mkhelp core
