#
# Makefile for rmxpatch.lib
#
# This makefile works with the make that is delivered with the Borland
# C++ compiler for OS/2. If it works woth another make that's fine, if
# it doesn't, tough luck. The makefile assumes the default search
# paths have been defined in turboc.cfg that should reside in the bin
# directory of the compiler. Assuming the compiler is installed in
# c:\bcos2, it should contain e.g.:
#
#     -IC:\BCOS2\INCLUDE
#     -LC:\BCOS2\LIb
#

#
# Build Macros
#

CXX		= bcc
CXXFLAGS	= -Od -v -w -sm -w-pia -Jgx -x- $(INCLUDE)
LDFLAGS		= -v -sm
EXEFLAGS	= $(LDFLAGS) -e$@

#
# Implicit Rules
#

.cpp.obj:
	$(CXX) $(CXXFLAGS) -c $&.cpp

#
# Macros
#

INCLUDE		= -I.;..\include
LIBRARY		= ..\rmxcomms\rmxcomms.lib

#
# Pseudo Targets
#

build: exe

exe: client.exe engine.exe server.exe

#
# Explicit Rules
#

client.exe: client.obj common.obj
	$(CXX) $(EXEFLAGS) $** $(LIBRARY)

server.exe: server.obj common.obj
	$(CXX) $(EXEFLAGS) $** $(LIBRARY)

engine.exe: engine.obj common.obj
	$(CXX) $(EXEFLAGS) $** $(LIBRARY)

clean:
	del *~ *.bak *.exe *.dll *.lib *.obj  2> NUL || echo.
