#
# Makefile for xmemos on Linux
#

########################################################
# WARNING
#
#     Change INSTALLPATH 
#     according to where you want the executable located
#     
#     Also, you must set XFORMLIBDIR and XFORMLIBDIR
#     to point to the Xforms include and library
#     file directories.
#
#     Also, you must set the INC and XLOAD to point
#     to the X include and library file directories.
#
#     Also, you must set the PRINTCOMMAND
#     for your system
#
#     You may also have to add a -L to point to the
#     Xpm library directory. In many cases the Xpm
#     library will already be found via the XLOAD 
#     setting.
#
########################################################
PROGRAM = 	xmemos

# PROGRAM install path
INSTALLPATH = /usr/local/bin

#PRINTCOMMAND = lpr
PRINTCOMMAND = "a2ps -Pps -q -1 -Hxmemos -nu -p "

# Compilation Details
CC = gcc
STDCFLAGS = -g -c -O2 -Wall -DPRINTCMD=\"$(PRINTCOMMAND)\"
STDLFLAGS = 
XFORMLIBDIR = -L/usr/lib
XFORMINCDIR = -I/usr/include
XINC = 
XLOAD = -L/usr/X11R6/lib  -lX11
ADMININC = xmemos.h xmemos2.h

# no change needed after this line...
# objects needed for the program
OBJS =  xmemos.o xmemos_cb.o xmemos_main.o
 
${PROGRAM}: $(OBJS)
	$(CC) -o ${PROGRAM} $(OBJS) $(XFORMINCDIR) \
	$(XINC) $(STDLFLAGS) $(XLOAD) $(XFORMLIBDIR) -lforms -lXpm -lm

.c.o:
	$(CC) $*.c $(STDCFLAGS) $(XFORMINCDIR) $(XINC) 

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

install:
	install --mode=711 $(PROGRAM) $(INSTALLPATH)

