1# -*- Makefile -*- Time-stamp: <07/05/31 01:05:40 ptr> 2# 3# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 4# Petr Ovtchenkov 5# 6# Copyright (c) 2006, 2007 7# Francois Dumont 8# 9# Portion Copyright (c) 1999-2001 10# Parallel Graphics Ltd. 11# 12# Licensed under the Academic Free License version 3.0 13# 14 15ifneq ($(OSNAME),linux) 16 17OPT += -tWC -w-par 18 19LDFLAGS += -Tpe -w -w-dup 20 21START_OBJ = c0x32.obj 22 23LDFLAGS += -L$(subst /,\\,$(STLPORT_DIR)/lib) 24 25ifdef WITH_DYNAMIC_RTL 26release-static: DEFS += -D_STLP_USE_STATIC_LIB 27dbg-static: DEFS += -D_STLP_USE_STATIC_LIB 28stldbg-static: DEFS += -D_STLP_USE_STATIC_LIB 29endif 30 31ifdef WITH_STATIC_RTL 32release-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB 33dbg-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB 34stldbg-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB 35endif 36 37else 38 39OPT += -tC 40 41LDFLAGS += -ap 42 43START_OBJ = borinit.o crt1.o 44 45endif 46 47ifdef USE_BCC_DBG_OPTS 48 49# optimization and debug compiler flags 50 51dbg-static : OPT += -R -v -y 52dbg-shared : OPT += -R -v -y 53stldbg-static : OPT += -R -v -y 54stldbg-shared : OPT += -R -v -y 55 56dbg-shared : LDFLAGS += -v 57dbg-static : LDFLAGS += -v 58stldbg-shared : LDFLAGS += -v 59stldbg-static : LDFLAGS += -v 60 61install-dbg-shared: install-dbg-shared-tds 62install-stldbg-shared: install-stldbg-shared-tds 63 64install-dbg-static: install-dbg-static-tds 65install-stldbg-static: install-stldbg-static-tds 66 67install-dbg-shared-tds: 68 $(INSTALL_EXE) $(OUTPUT_DIR_DBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_DBG)/${PRGNAME}.tds 69 70install-stldbg-shared-tds: 71 $(INSTALL_EXE) $(OUTPUT_DIR_STLDBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_STLDBG)/${PRGNAME}.tds 72 73install-dbg-static-tds: 74 $(INSTALL_EXE) $(OUTPUT_DIR_DBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_DBG)/${PRGNAME}.tds 75 76install-stldbg-static-tds: 77 $(INSTALL_EXE) $(OUTPUT_DIR_STLDBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_STLDBG)/${PRGNAME}.tds 78 79else 80 81dbg-shared : OPT += -vi- 82dbg-static : OPT += -vi- 83stldbg-shared : OPT += -vi- 84stldbg-static : OPT += -vi- 85 86endif 87 88PRG_FILES := ${PRGNAME}${EXE} ${PRGNAME}.tds ${PRGNAME}.map 89TMP_FILES := test.txt test_file.txt win32_file_format.tmp 90 91clean:: 92 $(foreach d, $(OUTPUT_DIRS), $(foreach f, $(PRG_FILES), @rm -f $(d)/$(f))) 93 94uninstall:: 95 $(foreach d, $(INSTALL_DIRS), $(foreach f, $(PRG_FILES), @rm -f $(d)/$(f))) 96 $(foreach d, $(INSTALL_DIRS), $(foreach f, $(TMP_FILES), @rm -f $(d)/$(f))) 97 $(foreach d, $(INSTALL_DIRS), @-rmdir -p $(d) 2>/dev/null) 98 99