# File: makefile.nt
# Author: Julian Smart
# Created: 1999
-# Updated:
+# Updated:
# Copyright: (c) Julian Smart
#
# Makefile environment for building samples. Include this from
# info
# Set WXDIR for your system
-WXDIR = j:\dev\wx2\wxWindows
+WXDIR = $(WXWIN)
WXUSINGDLL=0
!include $(WXDIR)\src\makevc.env
+!if "$(RM)" == ""
+RM= erase
+!endif
+
all: $(PROGRAM).exe
wx:
nmake -f makefile.vc clean
# cd $(THISDIR)
-$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS)
+
+!if "$(wxUSE_GUI)" == ""
+wxUSE_GUI=1
+!endif
+
+!if "$(wxUSE_GUI)" == "1"
+
+$(PROGRAM).exe: $(WXLIB) $(OBJECTS) $(PROGRAM).res
+ $(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(OBJECTS) $(DUMMYOBJ) $(PROGRAM).res
+$(LIBS)
+<<
+
+$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+ $(rc) -r /i$(WXDIR)\include /i$(WXDIR)\contrib\include -fo$@ $(PROGRAM).rc
+
+!else
+
+$(PROGRAM).exe: $(WXLIB) $(OBJECTS)
$(link) @<<
-out:$(PROGRAM).exe
$(LINKFLAGS)
-$(DUMMYOBJ) $(OBJECTS)
+$(OBJECTS) $(DUMMYOBJ)
$(LIBS)
<<
+!endif
+
+
clean:
- -erase $(OBJECTS)
- -erase *.exe
- -erase *.res
- -erase *.map
- -erase *.sbr
- -erase *.pdb
+ -$(RM) $(OBJECTS)
+ -$(RM) *.exe
+ -$(RM) *.res
+ -$(RM) *.map
+ -$(RM) *.sbr
+ -$(RM) *.pdb