#
# thanks to Holger Danielsson (dani@lara.prima.ruhr.de)
# for the new/enhanced rshell
#

CC	= gcc -Zwin32
CFLAGS	= -O2 -m486 -Wall
LDFLAGS =
RC	= grc.exe
RES	= rsrc.exe

.c.o:
	$(CC) $(CFLAGS) -c $<

OBJS =	rshell.o	\
	execute.o	\
	files.o 	\
	set.o		\
	goto.o		\
	if.o		\
	echo.o		\
	token.o 	\
	input.o 	\
	help.o		\
	rsxwin32.o

rsxwin32.exe: $(OBJS) rsxwin32.res
	$(CC) $(LDFLAGS) -o rsxwin32.exe $(OBJS) -lrsxioapp
	$(RES) rsxwin32.res rsxwin32.exe
	rsxntopt -b rsxwin32.exe -V

rsxwin32.res: rsxwin32.rc rsxwin32.ico rsxwin.ico
	$(RC) -r rsxwin32.rc
