#
# File:		makefile.dos
# Author:	Julian Smart
# Created:	1993
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds IPC example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info

WXDIR = $(WX)
THISDIR = $(WXDIR)\samples\ipc
WXLIB = $(WXDIR)\lib\wx.lib $(WXDIR)\contrib\fafa\fafa.lib
LIBS=$(WXLIB) oldnames ddeml libw llibcew commdlg shell ctl3d
INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw

!ifndef FINAL
FINAL=0
!endif

!if "$(FINAL)" == "0"
CPPFLAGS=/AL /W3 /Zi /G2sw /Od /YuWX.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
LINKFLAGS=/NOD /CO /ONERROR:NOEXE
!else
CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
LINKFLAGS=/NOD /ONERROR:NOEXE
!endif

CLIENT_HEADERS = client.h
CLIENT_SOURCES = client.cc
CLIENT_OBJECTS = client.obj
SERVER_HEADERS = server.h
SERVER_SOURCES = server.cc
SERVER_OBJECTS = server.obj

all:    client.exe server.exe

wx:
        cd $(WXDIR)\src\msw
        nmake -f makefile.dos
        cd $(THISDIR)

wxclean:
        cd $(WXDIR)\src\msw
        nmake -f makefile.dos clean
        cd $(THISDIR)


client.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) client.obj client.def client.res
        link $(LINKFLAGS) @<<
$(WXDIR)\src\msw\dummy.obj client.obj,
client,
NUL,
$(LIBS),
client.def
;
<<
        rc -30 -K client.res

client.obj:      client.h client.cc
        cl @<<
$(CPPFLAGS) /c /Tp $*.cc
<<

client.res :      client.rc $(WXDIR)\include\msw\wx.rc
    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw client

server.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(SERVER_OBJECTS) server.def server.res
        link $(LINKFLAGS) @<<
$(WXDIR)\src\msw\dummy.obj $(SERVER_OBJECTS),
server,
NUL,
$(LIBS),
server.def
;
<<
        rc -30 -K server.res

server.obj:      server.h server.cc
        cl @<<
$(CPPFLAGS) /c /Tp $*.cc
<<

server.res :      server.rc $(WXDIR)\include\msw\wx.rc
    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw server

clean:
        -erase *.obj *.exe *.res *.map *.rws
