| | @@ -627,10 +627,12 @@ |
| 627 | 627 | #### The toplevel directory of the source tree. Fossil can be built |
| 628 | 628 | # in a directory that is separate from the source tree. Just change |
| 629 | 629 | # the following to point from the build directory to the src/ folder. |
| 630 | 630 | # |
| 631 | 631 | SRCDIR = src |
| 632 | +SRCDIR_extsrc = extsrc |
| 633 | +SCRDIR_tools = tools |
| 632 | 634 | |
| 633 | 635 | #### The directory into which object code files should be written. |
| 634 | 636 | # |
| 635 | 637 | OBJDIR = wbld |
| 636 | 638 | |
| | @@ -1172,11 +1174,11 @@ |
| 1172 | 1174 | # SQLite Encryption Extension. |
| 1173 | 1175 | SQLITE3_SRC.0 = $(SRCDIR_extsrc)/sqlite3.c |
| 1174 | 1176 | SQLITE3_SRC.1 = $(SRCDIR_extsrc)/sqlite3-see.c |
| 1175 | 1177 | # SQLITE3_SRC.2 is set by top-level configure/makefile process. |
| 1176 | 1178 | SQLITE3_SRC. = $(SRCDIR_extsrc)/sqlite3.c |
| 1177 | | -SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(SQLITE3_ORIGIN)) |
| 1179 | +SQLITE3_SRC = $(SQLITE3_SRC.$(SQLITE3_ORIGIN)) |
| 1178 | 1180 | SQLITE3_SHELL_SRC.0 = $(SRCDIR_extsrc)/shell.c |
| 1179 | 1181 | SQLITE3_SHELL_SRC.1 = $(SRCDIR_extsrc)/shell-see.c |
| 1180 | 1182 | # SQLITE3_SHELL_SRC.2 comes from the configure process |
| 1181 | 1183 | SQLITE3_SHELL_SRC. = $(SRCDIR_extsrc)/shell.c |
| 1182 | 1184 | SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN)) |
| | @@ -1365,18 +1367,20 @@ |
| 1365 | 1367 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 1366 | 1368 | # to regenerate this file. |
| 1367 | 1369 | # |
| 1368 | 1370 | B = .. |
| 1369 | 1371 | SRCDIR = $B\src |
| 1372 | +SRCDIR_extsrc = $B\extsrc |
| 1373 | +SRCDIR_tools = $B\tools |
| 1370 | 1374 | OBJDIR = . |
| 1371 | 1375 | O = .obj |
| 1372 | 1376 | E = .exe |
| 1373 | 1377 | |
| 1374 | 1378 | |
| 1375 | 1379 | # Maybe DMDIR, SSL or INCL needs adjustment |
| 1376 | 1380 | DMDIR = c:\DM |
| 1377 | | -INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(DMDIR)\extra\include |
| 1381 | +INCL = -I. -I$(SRCDIR) -I$(SRCDIR_extsrc) -I$B\win\include -I$(DMDIR)\extra\include |
| 1378 | 1382 | |
| 1379 | 1383 | #SSL = -DFOSSIL_ENABLE_SSL=1 |
| 1380 | 1384 | SSL = |
| 1381 | 1385 | |
| 1382 | 1386 | CFLAGS = -o |
| | @@ -1528,11 +1532,12 @@ |
| 1528 | 1532 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 1529 | 1533 | # to regenerate this file. |
| 1530 | 1534 | # |
| 1531 | 1535 | B = .. |
| 1532 | 1536 | SRCDIR = $(B)\src |
| 1533 | | -SRCDIRX = $(B)\extsrc |
| 1537 | +SRCDIR_extsrc = $(B)\extsrc |
| 1538 | +SRCDIR_tools = $(B)\tools |
| 1534 | 1539 | T = . |
| 1535 | 1540 | OBJDIR = $(T) |
| 1536 | 1541 | OX = $(OBJDIR) |
| 1537 | 1542 | O = .obj |
| 1538 | 1543 | E = .exe |
| | @@ -1685,11 +1690,11 @@ |
| 1685 | 1690 | ZLIB = zdll.lib |
| 1686 | 1691 | !else |
| 1687 | 1692 | ZLIB = zlib.lib |
| 1688 | 1693 | !endif |
| 1689 | 1694 | |
| 1690 | | -INCL = /I. /I"$(OX)" /I"$(SRCDIR)" /I"$(B)\win\include" |
| 1695 | +INCL = /I. /I"$(OX)" /I"$(SRCDIR)" /I"$(SRCDIR_extsrc)" /I"$(B)\win\include" |
| 1691 | 1696 | |
| 1692 | 1697 | !if $(FOSSIL_ENABLE_MINIZ)==0 |
| 1693 | 1698 | INCL = $(INCL) /I"$(ZINCDIR)" |
| 1694 | 1699 | !endif |
| 1695 | 1700 | |
| | @@ -2174,11 +2179,12 @@ |
| 2174 | 2179 | endif |
| 2175 | 2180 | |
| 2176 | 2181 | # define the project directories |
| 2177 | 2182 | B=.. |
| 2178 | 2183 | SRCDIR=$(B)/src/ |
| 2179 | | -SRCDIRX=$(B)/extsrc/ |
| 2184 | +SRCDIR_extsrc=$(B)/extsrc/ |
| 2185 | +SRCDIR_tools=$(B)/tools/ |
| 2180 | 2186 | WINDIR=$(B)/win/ |
| 2181 | 2187 | ZLIBSRCDIR=../../zlib/ |
| 2182 | 2188 | |
| 2183 | 2189 | # define linker command and options |
| 2184 | 2190 | LINK=$(PellesCDir)/bin/polink.exe |
| | @@ -2188,11 +2194,11 @@ |
| 2188 | 2194 | # the fossil binary. Some special definitions follow for |
| 2189 | 2195 | # special files follow |
| 2190 | 2196 | CC=$(PellesCDir)\bin\pocc.exe |
| 2191 | 2197 | DEFINES=-D_pgmptr=g.argv[0] |
| 2192 | 2198 | CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) |
| 2193 | | -INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) /I $(SRCDIRX) |
| 2199 | +INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) /I $(SRCDIR_extsrc) |
| 2194 | 2200 | |
| 2195 | 2201 | # define commands for building the windows resource files |
| 2196 | 2202 | RESOURCE=fossil.res |
| 2197 | 2203 | RC=$(PellesCDir)\bin\porc.exe |
| 2198 | 2204 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| | @@ -2199,21 +2205,21 @@ |
| 2199 | 2205 | |
| 2200 | 2206 | # define the special utilities files, needed to generate |
| 2201 | 2207 | # the automatically generated source files |
| 2202 | 2208 | UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe |
| 2203 | 2209 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 2204 | | -UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIRX)$(uf:.exe=.c)) |
| 2210 | +UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR_tools)$(uf:.exe=.c)) |
| 2205 | 2211 | |
| 2206 | 2212 | # define the SQLite files, which need special flags on compile |
| 2207 | 2213 | SQLITESRC=sqlite3.c |
| 2208 | | -ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIRX)$(sf)) |
| 2214 | +ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR_extsrc)$(sf)) |
| 2209 | 2215 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 2210 | 2216 | SQLITEDEFINES=<<<SQLITE_OPTIONS>>> |
| 2211 | 2217 | |
| 2212 | 2218 | # define the SQLite shell files, which need special flags on compile |
| 2213 | 2219 | SQLITESHELLSRC=shell.c |
| 2214 | | -ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIRX)$(sf)) |
| 2220 | +ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR_extsrc)$(sf)) |
| 2215 | 2221 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 2216 | 2222 | SQLITESHELLDEFINES=<<<SHELL_OPTIONS>>> |
| 2217 | 2223 | |
| 2218 | 2224 | # define the th scripting files, which need special flags on compile |
| 2219 | 2225 | THSRC=th.c th_lang.c |
| | @@ -2279,14 +2285,14 @@ |
| 2279 | 2285 | # compile C sources with relevant options |
| 2280 | 2286 | |
| 2281 | 2287 | $(TRANSLATEDOBJ): %_.obj: %_.c %.h |
| 2282 | 2288 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 2283 | 2289 | |
| 2284 | | -$(SQLITEOBJ): %.obj: $(SRCDIRX)%.c $(SRCDIRX)%.h |
| 2290 | +$(SQLITEOBJ): %.obj: $(SRCDIR_extsrc)%.c $(SRCDIR_extsrc)%.h |
| 2285 | 2291 | $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 2286 | 2292 | |
| 2287 | | -$(SQLITESHELLOBJ): %.obj: $(SRCDIRX)%.c |
| 2293 | +$(SQLITESHELLOBJ): %.obj: $(SRCDIR_extsrc)%.c |
| 2288 | 2294 | $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 2289 | 2295 | |
| 2290 | 2296 | $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h |
| 2291 | 2297 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 2292 | 2298 | |
| 2293 | 2299 | |