#
# Makefile for building 32bit Windows program
#

CC = gcc
CFLAGS = -Wall -O2
WINLIB = /rsxwdk/lib/emx.a
RSXW32 = C:\RSXWDK\RSXW32.EXE

# program name
PRG = enumw

OBJS = enumw.o

#
# We create two files :
#   PRG.exe - rsxw32.exe file with resources
#   PRG.w32 - the EMX/GCC output
#
all : $(PRG).exe $(PRG).w32
	@echo Make Ready!

$(PRG).exe: $(RSXW32)
	copy /B $(RSXW32) $(PRG).exe
	rc $(PRG).res

$(PRG).w32: $(OBJS) $(WINLIB)
	$(CC) -L\rsxwdk\lib -o $(PRG).w32 $(OBJS) -lemx

relink:
	$(CC) -L\rsxwdk\lib -o $(PRG).w32 $(OBJS) \rsxwdk\libsrc\old\user.o -lemx -v
