Subversion Repositories DevTools

Rev

Rev 289 | Rev 297 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 289 Rev 295
Line 60... Line 60...
60
#     Include Paths
60
#     Include Paths
61
#     Object Directories
61
#     Object Directories
62
#     Resource Dirs
62
#     Resource Dirs
63
#     Unit Dirs
63
#     Unit Dirs
64
#
64
#
-
 
65
dcc_delphi_core = $(DELPHI7)/Lib
65
dcc_defines =
66
dcc_defines =
66
dcc_includes = $(INCDIRS)
67
dcc_includes = $(INCDIRS) $(dcc_delphi_core)
67
dcc_flags = $(CFLAGS)
68
dcc_flags = $(CFLAGS)
68
dcc_resources =
69
dcc_resources = $(OBJDIR) $(dcc_delphi_core)
69
dcc_units = $(LIBDIRS)
70
dcc_units = $(LIBDIRS) $(dcc_delphi_core)
70
 
71
 
71
ifeq "$(DEBUG)" "1"
72
ifeq "$(DEBUG)" "1"
72
dcc_defines	+= -DDEBUG -D+
73
dcc_defines	+= -DDEBUG -D+
73
else
74
else
74
dcc_defines	+= -D-
75
dcc_defines	+= -D-
Line 78... Line 79...
78
 
79
 
79
ifdef USE_WALL
80
ifdef USE_WALL
80
dcc_flags += -W -H
81
dcc_flags += -W -H
81
endif
82
endif
82
 
83
 
83
dcc_common_flags = -Q -Z -GP -GS\
84
dcc_common_flags = -Q -Z -GP -GS \
84
	$(dcc_flags) \
85
	$(dcc_flags) \
85
	$(dcc_defines) \
86
	$(dcc_defines) \
86
	$(patsubst %,-I%,$(dcc_includes)) \
87
	$(patsubst %,-I%,$(dcc_includes)) \
87
	$(patsubst %,-R%,$(dcc_includes)) \
88
	$(patsubst %,-R%,$(dcc_resources) $(dcc_includes)) \
88
	$(patsubst %,-U%,$(dcc_units))
89
	$(patsubst %,-U%,$(dcc_units))
89
 
90
 
90
#
91
#
91
# Rule to create a program
92
# Rule to create a program
92
# Defs:
93
# Defs:
Line 99... Line 100...
99
# Must check that its doing what we want to prevent the user doing silly things
100
# Must check that its doing what we want to prevent the user doing silly things
100
#
101
#
101
define DCC
102
define DCC
102
	@echo [$(notdir $(PSOURCE))] compiling prog..
103
	@echo [$(notdir $(PSOURCE))] compiling prog..
103
        $(AA_PRE)-rm -f $@
104
        $(AA_PRE)-rm -f $@
104
        $(XX_PRE)$(DELPHI7)/bin/dcc32 $(dcc_common_flags) -E$(BINDIR) $(PFLAGS) -N$(OBJDIR) $(patsubst %,-LU%,$(PACKAGES))  $(subst /,\\,$(PSOURCE))
105
        $(XX_PRE)$(DELPHI7)/bin/dcc32 $(dcc_common_flags) -E$(BINDIR) $(PFLAGS) -N$(OBJDIR) $(patsubst %,-LU%,$(PACKAGES)) $(subst /,\\,$(PSOURCE))
105
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
106
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
106
endef
107
endef
107
 
108
 
108
#
109
#
109
# Rule to create a Shared Library
110
# Rule to create a Shared Library
Line 127... Line 128...
127
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
128
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
128
endef
129
endef
129
 
130
 
130
#
131
#
131
# Rule to create a .LIB from a .DLL
132
# Rule to create a .LIB from a .DLL
-
 
133
# Defs:
-
 
134
#	TMPFILE		- PAth of temp file
132
#
135
#
133
define IMPLIB
136
define IMPLIB
134
	@echo [$(notdir $(notdir $@))] create import library..
137
	@echo [$(notdir $(notdir $@))] create import library..
-
 
138
        $(AA_PRE)if [ ! -x "$(BCB_IMPDEF_PATH)/impdef.exe" ] ; then echo "[Make] (E) Need, from borland builder: $(BCB_IMPDEF_PATH)/impdef"; exit 1; fi
-
 
139
        $(AA_PRE)if [ ! -x "$(MS_LINK_PATH)/link.exe" ] ; then echo "[Make] (E) Need, from MS VC6: $(MS_LINK_PATH)/link"; exit 1; fi
135
        $(AA_PRE)-rm -f $@
140
        $(AA_PRE)-rm -f $@ $(TMPFILE)
136
        $(XX_PRE)implib32.exe $<
141
        $(XX_PRE)$(BCB_IMPDEF_PATH)/impdef $(TMPFILE) $<
-
 
142
        $(XX_PRE)$(MS_LINK_PATH)/link /lib /machine:ix86 /def:$(TMPFILE) /out:$@
137
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
143
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
138
endef
144
endef
139
 
145
 
140
#
146
#
141
# Rule to create a Unit
147
# Rule to create a Unit
Line 147... Line 153...
147
# Must check that its doing what we want to prevent the user doing silly things
153
# Must check that its doing what we want to prevent the user doing silly things
148
#
154
#
149
define DCC_AR
155
define DCC_AR
150
	@echo [$(notdir $(PSOURCE))] compiling unit..
156
	@echo [$(notdir $(PSOURCE))] compiling unit..
151
        $(AA_PRE)-rm -f $@
157
        $(AA_PRE)-rm -f $@
152
        $(XX_PRE)$(DELPHI7)/bin/dcc32 $(dcc_common_flags) -E$(BINDIR) $(PFLAGS) -N$(LIBDIR) $(subst /,\\,$(PSOURCE))
158
        $(XX_PRE)$(DELPHI7)/bin/dcc32 $(dcc_common_flags) -E$(BINDIR) $(PFLAGS) -N$(LIBDIR) $(patsubst %,-LU%,$(PACKAGES)) $(subst /,\\,$(PSOURCE))
153
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
159
        $(AA_PRE)if [ ! -f $@ ] ; then echo "[Make] (E) Build artifact not found: $@"; exit 1; fi
154
endef
160
endef
155
 
161
 
-
 
162
#
-
 
163
# Rule to compile a resource file
-
 
164
#	$@ - Target
-
 
165
#	$< - source file ( first prereq: MUST BE )
-
 
166
#
-
 
167
define DRES
-
 
168
	@echo [$(notdir $(@))] Compile Resource..
-
 
169
        $(XX_PRE)$(DELPHI7)/bin/brcc32 -fo$@ -x $< $(patsubst %,-i%,$(dcc_includes))
-
 
170
endef
-
 
171