MSVC compatibility: Remove the {Agent,WinPty}DebugClient.cc hack.

* With this hack, it's impossible to add all the .cc files to an MSVC
   project, because MSVC understandably thinks that
   agent/AgentDebugClient.cc and shared/DebugClient.cc are two separate
   C++ translation units.  I could rename DebugClient.cc, but it's better
   to just fix the problem with the Makefile.
This commit is contained in:
Ryan Prichard 2012-12-20 03:06:58 -08:00
parent 41e7c31387
commit d02cccb256
5 changed files with 6 additions and 48 deletions

View File

@ -1,23 +0,0 @@
// Copyright (c) 2011-2012 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
// This is a hack. I want to compile DebugClient.cc into the project,
// and I don't know how to setup a Makefile to do it.
#include "../shared/DebugClient.cc"

View File

@ -31,7 +31,7 @@ OBJECTS = \
Terminal.o \
Win32Console.o \
ConsoleInput.o \
AgentDebugClient.o \
DebugClient.o \
Coord.o \
SmallRect.o \
main.o

View File

@ -31,6 +31,10 @@ CXXFLAGS += -MMD -Wall
@echo Compiling $<
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
%.o : ../shared/%.cc
@echo Compiling $<
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
# Attempt to detect whether configure has been run yet. The CWD will
# be one of the subdirectories, so refer to ../config-mingw.mk instead
# of ./config-mingw.mk.

View File

@ -22,7 +22,7 @@ include ../config.mk
include ../config-mingw.mk
LIBRARY = ../build/winpty.dll
OBJECTS = winpty.o WinPtyDebugClient.o
OBJECTS = winpty.o DebugClient.o
LDFLAGS += -shared -static-libgcc -static-libstdc++
CXXFLAGS += \

View File

@ -1,23 +0,0 @@
// Copyright (c) 2011-2012 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
// This is a hack. I want to compile DebugClient.cc into the project,
// and I don't know how to setup a Makefile to do it.
#include "../shared/DebugClient.cc"