#############################################################################
# Makefile for the Z88 other modules (the non-solver modules)
#
# Warning: only -DFR_XDOUB for double precision and -DFR_XLONG for long
# are allowed for this modules at this moment. However, the sources are
# semi-preprared, so you may change the format strings for proper operation.
# To operate this programs with 64-Bit longs, SGI compilers allow the switch
# -64. Exchange -n32 against -64 if desired. And - would -DFR_XQUAD (long
# double) make very much sense for programs other than solvers?     
#
# Warning: Some functions are used by both the solvers and the other
# Z88 programs. So, if you use -DFR_XDOUB here and -DFR_QUAD for the solver
# files, you may confuse the linker! It is a good idea to remove any "old"
# object files from former compiler runs. Here's the big idea:
# make -f z88.mk.other.sgi caution other
#  
# 14.4.2004 Rieg
#############################################################################

CC = gcc
CFLAGS = -mcpu=i486 -I. -I/usr/X11R6/include -DFR_UNIX -DFR_XDOUB -DFR_XLONG -O3\
 -fomit-frame-pointer

LDLIBSOM = -lc 
LDLIBSOX = -lm -lc 
LDLIBSNX = -L/usr/X11R6/lib -lXm -lXpm -lXt -lSM -lXp -lICE -lXext -lX11 -lc
LDLIBSMX = -L/usr/X11R6/lib -lXm -lXpm -lXt -lSM -lXp -lICE -lXext -lX11 -lm -lc
LDLIBSMO = -L/usr/X11R6/lib -lGLw -lGL -lXm -lXpm -lXt -lSM -lXp -lICE -lXext -lX11 -lm -lc

OBJECTSE = z88e.o ale88e.o dyn88e.o clr88.o m1.o m2.o stop88e.o cshe88.o\
 hexa88.o lqua88.o qshe88.o isod88.o tetr88.o spur88.o spla88.o hpla88.o\
 apla88.o riy88.o forc88.o who88e.o wlog88e.o wrim88e.o lan88e.o  

OBJECTSD = z88d.o ale88d.o dyn88d.o clr88.o m3.o m4.o fuvs88.o stop88d.o\
 scsh88.o shex88.o slqu88.o sqsh88.o siso88.o stet88.o sspu88.o sapl88.o\
 sspl88.o shpl88.o riy88d.o span88.o who88d.o wlog88d.o wrim88d.o lan88d.o  

OBJECTSN = z88n.o ale88n.o dyn88n.o clr88.o join88.o subn88.o stop88n.o\
 mc188n.o mc288n.o mc388n.o mc488n.o mc588n.o rni88.o who88n.o wlog88n.o\
 wrim88n.o lan88n.o

OBJECTSV = z88v.o ale88v.o dyn88v.o clr88.o stop88v.o fr_func.o vend88.o\
 g1i188.o g2i188.o g3i188.o g4i188.o g5i188.o gxi288.o g1i388.o g1i488.o\
 lan88v.o wlog88v.o who88v.o

OBJECTSX = z88x.o ale88x.o dyn88x.o clr88.o koi88x.o rea88x.o stop88x.o\
 sub88x.o who88x.o wlog88x.o wria88x.o wrim88x.o z88fx.o z88tx.o lan88x.o 

OBJECTSG = z88g.o ale88g.o clr88.o stop88g.o cosm88.o nast88.o\
 who88g.o wlog88g.o wrim88g.o lan88g.o 

OBJECTSH = z88h.o ale88h.o clr88.o stop88h.o\
 who88h.o wlog88h.o wrim88h.o lan88h.o rdy88h.o 

OBJECTSP = z88p.o cb88p.o lan88p.o dyn88p.o wlog88p.o ale88p.o rcol88.o\
 m5.o m6.o m7.o m8.o pc88.o pp88.o pgpc88.o pgpp88.o vc88.o vp88.o\
 vgpc88.o vgpp88.o

OBJECTSO = z88o.o cb88o.o lan88o.o dyn88o.o wlog88o.o ale88o.o rcoo88.o\
 m9.o m10.o m12.o m14.o m15.o oc88.o

OBJECTSC = z88com.o cb88c.o lan88c.o wlog88c.o ale88c.o rcol88c.o

OBJECTSL = laserj88.o

OBJECTSPX= pxon88.o

HEADERE = z88e.h
HEADERD = z88d.h
HEADERN = z88n.h
HEADERV = z88v.h
HEADERX = z88x.h
HEADERG = z88g.h
HEADERH = z88h.h
HEADERP = z88p.h
HEADERO = z88o.h
HEADERC = z88com.h

caution:
	rm -f clr88.o m1.o m2.o cshe88.o hexa88.o 
	rm -f lqua88.o qshe88.o isod88.o tetr88.o
	rm -f spur88.o spla88.o hpla88.o apla88.o

other: z88e z88d z88n z88v z88x z88g z88h z88p z88o z88com laserj88 pxon88

clean:
	rm -f *.o
	rm -f *.log
	rm -f *.bny
	rm -f z*.txt
	rm -f z88p.sto

ready:
	cp b1_x.dxf z88x.dxf
	cp b1_2.txt z88i2.txt
	cp b1_3.txt z88i3.txt
	cp b1_4.txt z88i4.txt

z88e: $(OBJECTSE)
	$(CC) -o $@ $(OBJECTSE) $(LDLIBSOX)

z88d: $(OBJECTSD)
	$(CC) -o $@ $(OBJECTSD) $(LDLIBSOX)

z88n: $(OBJECTSN)
	$(CC) -o $@ $(OBJECTSN) $(LDLIBSOX)

z88v: $(OBJECTSV)
	$(CC) -o $@ $(OBJECTSV) $(LDLIBSOM)

z88x: $(OBJECTSX)
	$(CC) -o $@ $(OBJECTSX) $(LDLIBSOX)

z88g: $(OBJECTSG)
	$(CC) -o $@ $(OBJECTSG) $(LDLIBSOM)

z88h: $(OBJECTSH)
	$(CC) -o $@ $(OBJECTSH) $(LDLIBSOM)

z88p: $(OBJECTSP)
	$(CC) -o $@ $(OBJECTSP) $(LDLIBSMX)

z88o: $(OBJECTSO)
	$(CC) -o $@ $(OBJECTSO) $(LDLIBSMO)

z88com:$(OBJECTSC)
	$(CC) -o $@ $(OBJECTSC) $(LDLIBSNX)

laserj88:$(OBJECTSL)
	$(CC) -o $@ $(OBJECTSL)

pxon88:$(OBJECTSPX)
	$(CC) -o $@ $(OBJECTSPX)

