.SUFFIXES: .w32 .a .o .c
CC = gcc.exe
CFLAGS = -Wall -O2

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

#
# build test.exe app
#

RC = RC.EXE
RSXW32 = C:\RSXWDK\RSXW32.EXE

test: test.exe test.w32

test.exe: test.res $(RSXW32)
	command.com /c copy /B $(RSXW32) test.exe
	$(RC) -t test.res

test.res: test.rc
	$(RC) -r test.rc

test.w32: test.o \rsxwdk\lib\emx.a
	$(CC) -L\rsxwdk\lib -o test.w32 test.o $(OBJS) -lemx -lwinio


enumwnd: enumwnd.exe enumwnd.w32

enumwnd.exe: enumwnd.res $(RSXW32)
	command.com /c copy /B $(RSXW32) enumwnd.exe
	$(RC) -t enumwnd.res

enumwnd.res: enumwnd.rc
	$(RC) -r enumwnd.rc

enumwnd.w32: enumwnd.o \rsxwdk\lib\emx.a
	$(CC) -L\rsxwdk\lib -o enumwnd.w32 enumwnd.o $(OBJS) -lemx -lwinio

