#
# Makefile for building 32bit Windows program
#

CC = gcc
CFLAGS = -O2
WINLIB = /rsxwdk/lib/emx.a

# rsxwdk extender for 32bit windows prgs (without recources!)
RSXW32 = C:\RSXWDK\RSXW32.EXE

# program name
PRG = dlltst

OBJS = dlltst.o dll32.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

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