# makefile for EULER
# This makefile is for QNX
# After that:
# make
# make noxeuler
# make install
# cd progs; euler
# or:
# cd progs; noxeuler
# view docs/euler.html with any Web browser.

# Changes for other systems:
# Change 8x13 to your favorite text font.
# Define -DRS6000 on IBM RS6000 machines.
# else provide -DSY_CLK_TCK=50 (clock ticks on your machine)
# else the program will time seconds only.
# Define -DSUN for Sun keybords
# Define -DFPE, if NaN and INF are not available by hardware
#               and program does crash on 1/0.
# Define -DCHDIR, if chdir makes troubles on make noxeuler.
# Define -DBACKSPACE, if backspace does not work, only delete
# Define -DSPECIAL_ALIGNMENT, if allignment is necessary
#               (in the CC command line)
# Additionally define -DALIGNMENT=xx, if xx is different from 8
#               (the default alignment factor)
#               (in the CC command line)

# If you do not have M_PI or PI and need pi with more than 16 digits
# define it -DPI=3.1415... (not necessary for 8 byte doubles)

CC=cc 

# This is for printing the DOC on your local printer
# Set the number to the intended page length in lines
PRINTERPAGE=50

CFLAGS= -5 -Omratxe -DCHDIR -DFONT=\"6x13\" -DGFONT=\"6x13\" -DSY_CLK_TCK=50 -DFPE -Dunix

FILES= assign.o binary.o builtin.o express.o extend.o\
		fft.o funcs.o graphics.o helpf.o input.o interval.o\
		mainloop.o matheh.o output.o polynom.o scalp.o\
		spread.o stack.o store.o udf.o help.o special.o\
		feval.o

../euler: $(FILES) sysdept.o makefile
	$(CC) -o ../euler $(FILES) sysdept.o 

udf.o : header.h sysdep.h stack.h udf.c help.h
	$(CC) -c  udf.c

store.o : header.h store.h store.c
	$(CC) -c  store.c

stack.o : header.h stack.h stack.c
	$(CC) -c  stack.c

spread.o : header.h sysdep.h funcs.h interval.h spread.h stack.h spread.c
	$(CC) -c  spread.c

polynom.o : header.h polynom.h funcs.h matheh.h interval.h\
	express.h stack.h polynom.c
	$(CC) -c  polynom.c

output.o : header.h sysdep.h output.c
	$(CC) -c  output.c

matheh.o : header.h sysdep.h matheh.h stack.h matheh.c
	$(CC) -c  matheh.c

mainloop.o : header.h sysdep.h funcs.h graphics.h version.h\
	interval.h builtin.h stack.h mainloop.c
	$(CC) -c  mainloop.c

interval.o : header.h interval.h spread.h stack.h interval.c
	$(CC) -c  interval.c

input.o : header.h sysdep.h input.c
	$(CC) -c  input.c

helpf.o : header.h funcs.h helpf.h matheh.h interval.h stack.h helpf.c
	$(CC) -c  helpf.c

graphics.o : header.h sysdep.h funcs.h graphics.h stack.h graphics.c
	$(CC) -c  graphics.c

funcs.o : header.h sysdep.h funcs.h matheh.h polynom.h helpf.h\
	interval.h spread.h express.h stack.h funcs.c
	$(CC) -c  funcs.c

assign.o : header.h stack.h extend.h interval.h assign.c
	$(CC) -c  assign.c

binary.o : header.h stack.h binary.c
	$(CC) -c  binary.c

builtin.o : header.h builtin.h builtin.c
	$(CC) -c  builtin.c

edit.o : header.h sysdep.h graphics.h edit.c
	$(CC) -c  edit.c

express.o : header.h sysdep.h funcs.h interval.h builtin.h express.h stack.h express.c
	$(CC) -c  express.c

extend.o : header.h extend.h extend.c
	$(CC) -c  extend.c

feval.o : header.h stack.h builtin.h sysdep.h feval.c
	$(CC) -c  feval.c

fft.o : header.h matheh.h sysdep.h fft.c
	$(CC) -c  fft.c

scalp.o : header.h interval.h express.h stack.h scalp.c
	$(CC) -c  scalp.c

special.o : header.h stack.h spread.h special.c
	$(CC) -c  special.c

help.o : header.h help.h help.c
	$(CC) -c  help.c

sysdepx.o : header.h sysdep.h sysdepx.c help.c
	$(CC) $(CFLAGS) -c sysdepx.c

sysdept.o : header.h sysdep.h sysdept.c
	$(CC) $(CFLAGS) -c sysdept.c

install: xeuler noxeuler
	cp help.txt xeuler noxeuler ../progs

clean:
	rm *.o xeuler noxeuler
