← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcpp-plugin-sdk-cpp/DescriptionRotator] Rev 41: merge

 

Merge authors:
  poy (poy)
------------------------------------------------------------
revno: 41 [merge]
committer: poy <poy@xxxxxxxxxx>
branch nick: DescriptionRotator
timestamp: Thu 2013-06-20 19:28:42 +0200
message:
  merge
modified:
  projects/make/Makefile


--
lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/DescriptionRotator
https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/DescriptionRotator

Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/DescriptionRotator.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/DescriptionRotator/+edit-subscription
=== modified file 'projects/make/Makefile'
--- projects/make/Makefile	2013-06-18 21:42:32 +0000
+++ projects/make/Makefile	2013-06-20 17:28:42 +0000
@@ -38,10 +38,16 @@
 
 COMPILER_SPEC = $(shell $(CC) -dumpmachine)
 
-ifeq ($(findstring mingw, $(COMPILER_SPEC)),)
-	BINEXT =
-	LIBEXT = .so
-else
+ifneq ($(findstring mingw, $(COMPILER_SPEC)),)
+	WIN_TARGET = 1
+endif
+ifeq ($(OS), Windows_NT)
+	ifeq ($(findstring Cygwin, $(SHELL)),)
+		WIN_SHELL = 1
+	endif
+endif
+
+ifdef WIN_TARGET
 	BINEXT = .exe
 	CPPFLAGS += -D_WIN32_WINNT=0x502 -DWINVER=0x502 -D_WIN32_IE=0x600 \
 				-DNOMINMAX -DSTRICT -DWIN32_LEAN_AND_MEAN \
@@ -49,6 +55,9 @@
 	LIBEXT = .dll
 	OBJS += src/resource.o
 	OUTPUT_DIR := $(OUTPUT_DIR)-mingw
+else
+	BINEXT =
+	LIBEXT = .so
 endif
 
 ifeq ($(findstring x86_64, $(COMPILER_SPEC)),)
@@ -60,14 +69,9 @@
 	TARGET := $(TARGET)-x64
 endif
 
-ifeq ($(OS), Windows_NT)
-	ifeq ($(findstring Cygwin, $(SHELL)),)
-		MKDIR = if not exist $(subst /,\,$1) md $(subst /,\,$1)
-		RMDIR = if exist $(subst /,\,$1) rd /s /q $(subst /,\,$1)
-	else
-		MKDIR = mkdir -p $1
-		RMDIR = $(RM) -r $1
-	endif
+ifdef WIN_SHELL
+	MKDIR = if not exist $(subst /,\,$1) md $(subst /,\,$1)
+	RMDIR = if exist $(subst /,\,$1) rd /s /q $(subst /,\,$1)
 else
 	MKDIR = mkdir -p $1
 	RMDIR = $(RM) -r $1
@@ -75,17 +79,17 @@
 
 # boost
 CPPFLAGS += -I../../boost
-ifneq ($(findstring mingw, $(COMPILER_SPEC)),)
+ifdef WIN_TARGET
 	CPPFLAGS += -DBOOST_ALL_NO_LIB -DBOOST_USE_WINDOWS_H
 endif
 OBJS += boost/libs/system/src/error_code.o
 
 # dwt
 CPPFLAGS += -I../../dwt/include -DDWT_SHARED
-ifeq ($(findstring mingw, $(COMPILER_SPEC)),)
+ifdef WIN_TARGET
+	LINKFLAGS += -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -lshlwapi -luuid -luxtheme
+else
 $(error "dwt requires a compiler with Windows as target")
-else
-	LINKFLAGS += -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -lshlwapi -luuid -luxtheme
 endif
 OBJS += dwt/src/Application.o dwt/src/Bitmap.o dwt/src/Brush.o dwt/src/CanvasClasses.o \
 	dwt/src/Clipboard.o dwt/src/CommandLine.o dwt/src/Dispatcher.o dwt/src/DWTException.o \
@@ -110,18 +114,18 @@
 	dwt/src/widgets/TextBox.o dwt/src/widgets/ToolBar.o dwt/src/widgets/ToolTip.o \
 	dwt/src/widgets/Tree.o dwt/src/widgets/VirtualTree.o dwt/src/widgets/Window.o
 
-ifeq ($(findstring mingw, $(COMPILER_SPEC)),)
-	PDB =
-else
+ifdef WIN_TARGET
 	PDB := $(OUTPUT_DIR)/$(TARGET).pdb
 
-	ifeq ($(findstring Cygwin, $(SHELL)),)
+	ifdef WIN_SHELL
 		RCFLAGS := -DPLUGIN_FILE_NAME="^\\"$(TARGET)\\"" \
 			-DPLUGIN_FILE_NAME_EXT="^\\"$(TARGET)$(LIBEXT)\\""
 	else
 		RCFLAGS := -DPLUGIN_FILE_NAME="\\\"$(TARGET)\\\"" \
 			-DPLUGIN_FILE_NAME_EXT="\\\"$(TARGET)$(LIBEXT)\\\""
 	endif
+else
+	PDB =
 endif
 
 TARGET := $(OUTPUT_DIR)/$(TARGET)$(LIBEXT)
@@ -135,7 +139,7 @@
 $(TARGET): $(OBJS)
 	$(CXX) $^ $(LINKFLAGS) $(LINKXXFLAGS) $(OUTPUT_OPTION)
 
-ifneq ($(findstring mingw, $(COMPILER_SPEC)),)
+ifdef WIN_TARGET
 $(PDB): $(TARGET)
 	strip --only-keep-debug $< $(OUTPUT_OPTION) && strip $<
 endif
@@ -152,7 +156,7 @@
 $(OUTPUT_DIR)/%.o: %.cpp
 	$(COMPILE.cpp) $< $(OUTPUT_OPTION)
 
-ifneq ($(findstring mingw, $(COMPILER_SPEC)),)
+ifdef WIN_TARGET
 $(OUTPUT_DIR)/%.o: %.rc
 	windres $< $(RCFLAGS) $(OUTPUT_OPTION)
 endif