# The order to search for rules and files is specified by .SUFFIXES
.SUFFIXES : .o .c .s

# DEFAULT RULES
# To produce a `.o' file from a `.s' file using gcc.
.s.o:; gcc -c $(AFLAGS) $*.s

# To produce a `.o' file from a `.c' file using gcc. 
.c.o:; gcc -c $(CFLAGS) $*.c

OFILES=xlisp.o xlbfun.o xlcont.o xldbug.o xldmem.o xleval.o \
xlfio.o xlglob.o xlimage.o xlinit.o xlio.o xljump.o xllist.o \
xlmath.o xlobj.o xlpp.o xlprin.o xlread.o xlstr.o xlsubr.o \
xlsym.o xlsys.o xlseq.o gccstuff.o gccasm.o xlstruct.o xlmath2.o

CFLAGS= -O -DGCC -DVMEM=1000000
AFLAGS= 

# the following copy statement depends on go32 version
# the 3/91 version can use stub.exe or go32.exe. Using go32.exe 
#  reduces the amount of overhead in SYSTEM function.
# the 2/91 version requires using go32.exe rather than stub.exe
# the 1/91 version cannot do this at all (comment out copy)
#  but requires copying go32.exe into xlispg.exe

xlispg.exe:	$(OFILES) xlftab.o xlispg.lnk
	gcc @xlispg.lnk
	nm +nu xlispg >xlispg.map
	copy /b go32.exe+xlispg xlispg.exe 

#	erase xlispg

xlispg.lnk:	makegcc
	>xlispg.lnk $(OFILES) xlftab.o -lm -o xlispg

xlisp.h:	xldmem.h xlftab.h
	touch xlisp.h

xlftab.o:	xlisp.h osdefs.h osptrs.h
$(OFILES):	xlisp.h

