1# Time-stamp: <07/03/08 21:41:52 ptr> 2# 3# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 4# Petr Ovtchenkov 5# 6# Portion Copyright (c) 1999-2001 7# Parallel Graphics Ltd. 8# 9# Licensed under the Academic Free License version 3.0 10# 11 12#INCLUDES = -I$(SRCROOT)/include 13#INCLUDES := 14 15CXX := cl.exe 16CC := cl.exe 17LINK := link.exe 18RC := rc.exe 19 20DEFS ?= 21OPT ?= 22 23# OUTPUT_OPTION = /Fo$@ 24release-shared: OUTPUT_OPTION = /Fo$@ 25release-static: OUTPUT_OPTION = /Fo$@ 26dbg-shared : OUTPUT_OPTION = /Fo$@ /Fd"${OUTPUT_DIR_DBG}" 27stldbg-shared : OUTPUT_OPTION = /Fo$@ /Fd"${OUTPUT_DIR_STLDBG}" 28dbg-static : OUTPUT_OPTION = /Fo$@ /Fd"${OUTPUT_DIR_A_DBG}" 29stldbg-static : OUTPUT_OPTION = /Fo$@ /Fd"${OUTPUT_DIR_A_STLDBG}" 30LINK_OUTPUT_OPTION = /OUT:$@ 31RC_OUTPUT_OPTION = /fo $@ 32DEFS += /D "WIN32" /D "_WINDOWS" 33CPPFLAGS = $(DEFS) $(INCLUDES) 34 35CFLAGS = /nologo /TC /W3 /GR /GX /Zm800 $(OPT) 36CXXFLAGS = /nologo /TP /W3 /GR /GX /Zm800 $(OPT) 37COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) /c 38COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) /c 39LINK.cc = $(LINK) /nologo $(LDFLAGS) $(TARGET_ARCH) 40COMPILE.rc = $(RC) $(RCFLAGS) 41 42CDEPFLAGS = /FD /E 43CCDEPFLAGS = /FD /E 44 45# STLport DEBUG mode specific defines 46stldbg-static : DEFS += /D_DEBUG /D "_STLP_DEBUG" 47stldbg-shared : DEFS += /D_DEBUG /D "_STLP_DEBUG" 48stldbg-static-dep : DEFS += /D_DEBUG /D "_STLP_DEBUG" 49stldbg-shared-dep : DEFS += /D_DEBUG /D "_STLP_DEBUG" 50 51dbg-static : DEFS += /D_DEBUG 52dbg-shared : DEFS += /D_DEBUG 53dbg-static-dep : DEFS += /D_DEBUG 54dbg-shared-dep : DEFS += /D_DEBUG 55 56release-static : DEFS += /DNDEBUG 57release-shared : DEFS += /DNDEBUG 58release-static-dep : DEFS += /DNDEBUG 59release-shared-dep : DEFS += /DNDEBUG 60 61# optimization and debug compiler flags 62release-static : OPT += /O2 /Og 63release-shared : OPT += /O2 /Og 64 65dbg-static : OPT += /Zi 66dbg-shared : OPT += /Zi 67#dbg-static-dep : OPT += -g 68#dbg-shared-dep : OPT += -g 69 70stldbg-static : OPT += /Zi 71stldbg-shared : OPT += /Zi 72#stldbg-static-dep : OPT += -g 73#stldbg-shared-dep : OPT += -g 74 75# dependency output parser (dependencies collector) 76 77# oh, there VC is no mode has no options to print dependencies 78# in more-or-less acceptable format. I use VC as preprocessor 79# and see first line (here VC print file name). 80 81# bug here: if no dependencies: 82# --------------------------------- 83# int main() { return 0; } 84# --------------------------------- 85# this sed script produce wrong output 86# --------------------------------- 87# obj/vc6/shared/xx.o obj/vc6/shared/xx.d : obj/vc6/shared/xx.cpp \ 88# --------------------------------- 89# (wrong backslash at eol) 90 91 92DP_OUTPUT_DIR = | grep "^\#line 1 " | (echo -e 's|\([a-zA-Z]\):|/cygdrive/\1|g\nt next\n: next\n1s|^\#line 1 \(.*\)|$(OUTPUT_DIR)/$*.o $@ : $< \\\\|\nt\n$$s|^\#line 1 "\(.*\)"|\1|g\nt space\ns|^\#line 1 "\(.*\)"|\1\\\\|g\nt space\nd\n: space\ns| |\\\\ |g\ns|^| |\ns|\\\\\\\\|/|g\n' > $(OUTPUT_DIR)/tmp.sed; sed -f $(OUTPUT_DIR)/tmp.sed; rm -f $(OUTPUT_DIR)/tmp.sed ) > $@; \ 93 [ -s $@ ] || rm -f $@ 94 95DP_OUTPUT_DIR_DBG = | grep "^\#line 1 " | (echo -e 's|\([a-zA-Z]\):|/cygdrive/\1|g\nt next\n: next\n1s|^\#line 1 \(.*\)|$(OUTPUT_DIR_DBG)/$*.o $@ : $< \\\\|\nt\n$$s|^\#line 1 "\(.*\)"|\1|g\nt space\ns|^\#line 1 "\(.*\)"|\1\\\\|g\nt space\nd\n: space\ns| |\\\\ |g\ns|^| |\ns|\\\\\\\\|/|g\n' > $(OUTPUT_DIR_DBG)/tmp.sed; sed -f $(OUTPUT_DIR_DBG)/tmp.sed; rm -f $(OUTPUT_DIR_DBG)/tmp.sed ) > $@; \ 96 [ -s $@ ] || rm -f $@ 97 98DP_OUTPUT_DIR_STLDBG = | grep "^\#line 1 " | (echo -e 's|\([a-zA-Z]\):|/cygdrive/\1|g\nt next\n: next\n1s|^\#line 1 \(.*\)|$(OUTPUT_DIR_STLDBG)/$*.o $@ : $< \\\\|\nt\n$$s|^\#line 1 "\(.*\)"|\1|g\nt space\ns|^\#line 1 "\(.*\)"|\1\\\\|g\nt space\nd\n: space\ns| |\\\\ |g\ns|^| |\ns|\\\\\\\\|/|g\n' > $(OUTPUT_DIR_STLDBG)/tmp.sed; sed -f $(OUTPUT_DIR_STLDBG)/tmp.sed; rm -f $(OUTPUT_DIR_STLDBG)/tmp.sed ) > $@; \ 99 [ -s $@ ] || rm -f $@ 100