| 235 |
dpurdie |
1 |
###############################################################################
|
| 6177 |
dpurdie |
2 |
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
|
| 235 |
dpurdie |
3 |
#
|
|
|
4 |
# File: TOOLSET/borland.rul[e]
|
|
|
5 |
# Contents: Rules to build Borland C++
|
|
|
6 |
#
|
|
|
7 |
###############################################################################
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
###############################################################################
|
|
|
11 |
#.. Parse user options
|
|
|
12 |
# Global options already parsed
|
|
|
13 |
# These options extend the global options
|
|
|
14 |
#
|
|
|
15 |
ifdef OPTIONS
|
|
|
16 |
endif
|
|
|
17 |
|
|
|
18 |
###############################################################################
|
|
|
19 |
#
|
|
|
20 |
# Make MAcro to assist in building Borland Project Files
|
|
|
21 |
# Arguments
|
|
|
22 |
# $1 - Name of the project file
|
|
|
23 |
# $2 - Path to the project
|
|
|
24 |
# $3 - Name of makefile
|
|
|
25 |
# $4 - Name of logfile
|
|
|
26 |
#
|
|
|
27 |
#
|
|
|
28 |
# The following script will
|
|
|
29 |
# Setup the PATH to include DLLs
|
|
|
30 |
# Convert the project file into a makefile
|
|
|
31 |
# cd to the target directory
|
|
|
32 |
# Run make on the makefile
|
|
|
33 |
# Create ilink32.cfg to create local defs
|
|
|
34 |
# Force DCC32 to use Quiet mode
|
|
|
35 |
# Report errors
|
|
|
36 |
#
|
|
|
37 |
define MakeProject
|
|
|
38 |
( $(rm) -f $(4); \
|
|
|
39 |
. $(INTERFACEDIR)/set_$(GBE_PLATFORM).sh; \
|
|
|
40 |
rm -f $(3); \
|
| 237 |
dpurdie |
41 |
echo "[BORLAND] Building Project: $(2)/$(1)"; \
|
|
|
42 |
echo "[BORLAND] Converting Project file to Makefile: $(1)"; \
|
| 235 |
dpurdie |
43 |
bpr2mak.exe -o$(3) "$(2)/$(1)" >$(4) 2>&1; \
|
|
|
44 |
ret=$$?; \
|
| 237 |
dpurdie |
45 |
if [ $$ret -gt 0 ] ; then \
|
|
|
46 |
echo "Error creating Makefile"; \
|
| 235 |
dpurdie |
47 |
echo >>$(4); \
|
|
|
48 |
$(GBE_BIN)/cat $(4); \
|
|
|
49 |
exit $$ret; \
|
|
|
50 |
fi; \
|
| 237 |
dpurdie |
51 |
echo "[BORLAND] Running Makefile: $(1)"; \
|
| 235 |
dpurdie |
52 |
cd "$(2)"; \
|
|
|
53 |
echo '-L"$(BCB)/Lib/Release"' > ilink32.cfg; \
|
|
|
54 |
make.exe -f$(CURDIR)/$(3) -DDCC32="dcc32 -Q" >$(CURDIR)/$(4) 2>&1; \
|
|
|
55 |
ret=$$?; \
|
|
|
56 |
rm -f ilink32.cfg; \
|
|
|
57 |
cd $(CURDIR); \
|
|
|
58 |
echo >>$(4); \
|
|
|
59 |
$(GBE_BIN)/cat $(4); \
|
|
|
60 |
exit $$ret )
|
|
|
61 |
endef
|
|
|
62 |
#
|