-$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
- brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(TARGET)
+!if "$(wxUSE_GUI)" != "0"
+#make resources only with GUI apps
+$(TARGETRES) : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+ brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include /i$(WXDIR)\contrib\include -fo$(EXEDIR)\$(<B).res $(TARGET)
+!endif