#========================================================================
# 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.5 $	$Date: 1994/09/29 14:51:58 $
#========================================================================

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

CC = cc
CFLAGS = -O6 -DSYSV
#CFLAGS = -g -DSYSV

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

# Linux dynamic libraries..
DYN_LIBS = -lMrm -lXm -lXmu -lXt -lXext -lX11 -lm

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

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

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


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

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

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

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

help.c:		help.dat
		mkhelp

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

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

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

aview:		aview.o
		$(CC) -o aview aview.o

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