# Makefile by Paul Wilkins
# this will compile the program 'xrpn'
# Please read the next fwe lines and enter the correct values.

# What compiler should be used
CC = gcc 

# add an entry here for your X and Motif headers
CFLAGS = -g -O3 -I/usr/X11/include  -I/usr/dt/include -I/usr/openwin/include
#CFLAGS = -g -O3 -I/loc/libs/lesstif/include -I/usr/X11/include
#CFLAGS = -g -O3 -I/local/include -I/usr/dt/include -I/usr/openwin/include

# add an entry here for your X and Motif libraries
DFLAGS =  -L/usr/X11/lib   -L/usr/dt/lib -L/usr/openwin/lib
#DFLAGS =  -L/usr/X11/lib  -L/loc/libs/lesstif/lib  -Wl,-rpath=/loc/libs/lesstif/lib 
#DFLAGS =  -L/usr/X11/lib  -L/local/lib -L/usr/dt/lib -L/usr/openwin/lib


# end of user configurable section




OBJS = real.o complex.o matrix.o number.o funcs.o \
	constant.o button_def.o run_cmd.o \
	main.o stack.o lcd.o setup_menu.o callback_menu.o \
	process_input.o \
	setup_buttons.o callback_buttons.o editor.o \
	error.o help.o mode.o



LIBS   = -lXm -lXt -lX11 -lm 


xrpn:	$(OBJS)
	$(CC) $(DFLAGS) -o $@ $(OBJS) $(LIBS) 

pure:	$(OBJS)
	$(PURIFY) $(CC) $(DFLAGS) -o $@ $(OBJS) $(LIBS) 

.c.o:
	$(CC) -c -o $@ $(CFLAGS) $*.c

depend:
	rm -f .depend
	$(CC) -MM $(CFLAGS) *.c >> .depend


clean:
	rm -f core xrpn *.o

include .depend

