#
# Makefile for building 32bit Windows program
#

CC = gcc
CFLAGS = -O2 -Zc++-comments
RC = RC.EXE
RSXW32 = C:\RSXWDK\RSXW32.EXE

# program name
PRG = blandmdi

# rsxwdk extender for 32bit windows prgs (without recources!)

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

.o.w32:
	$(CC) -o $(PRG).w32 $<

all : $(PRG).exe $(PRG).w32
	@echo Make Ready!

#
# We create two files :
#   PRG.exe - rsxrc file with resources
#   PRG.w32 - the EMX/GCC output
#

OBJS = blandmdi.o blandini.o

$(PRG).exe: $(PRG).res $(RSXW32)
	copy /B $(RSXW32) $(PRG).exe
	$(RC) -t $(PRG).res $(PRG).exe

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

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

