Fossil SCM
Per chat discussion and [forum:fd49a822db5bc522 | forum post fd49a822db5bc522], removed PellesC build from makemake.tcl and the corresponding makefile.
Commit
fcb33239b52340eed1b596ae96774f11c9c17d1f9a3240355b1b0d2913aea867
Parent
5b4a729b71a0c36…
2 files changed
-205
-196
-205
| --- tools/makemake.tcl | ||
| +++ tools/makemake.tcl | ||
| @@ -2060,210 +2060,5 @@ | ||
| 2060 | 2060 | close $output_file |
| 2061 | 2061 | # |
| 2062 | 2062 | # End of the win/Makefile.msc output |
| 2063 | 2063 | ############################################################################## |
| 2064 | 2064 | ############################################################################## |
| 2065 | -############################################################################## | |
| 2066 | -# Begin win/Makefile.PellesCGMake output | |
| 2067 | -# | |
| 2068 | -puts "building ../win/Makefile.PellesCGMake" | |
| 2069 | -set output_file [open ../win/Makefile.PellesCGMake w] | |
| 2070 | -fconfigure $output_file -translation binary | |
| 2071 | - | |
| 2072 | -writeln [string map [list \ | |
| 2073 | - <<<SQLITE_OPTIONS>>> [join $SQLITE_WIN32_OPTIONS { }] \ | |
| 2074 | - <<<SHELL_OPTIONS>>> [join $SHELL_WIN32_OPTIONS { }]] {# | |
| 2075 | -############################################################################## | |
| 2076 | -# WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "tools/makemake.tcl") | |
| 2077 | -############################################################################## | |
| 2078 | -# | |
| 2079 | -# This file is automatically generated. Instead of editing this | |
| 2080 | -# file, edit "makemake.tcl" then run "tclsh makemake.tcl" | |
| 2081 | -# to regenerate this file. | |
| 2082 | -# | |
| 2083 | -# HowTo | |
| 2084 | -# ----- | |
| 2085 | -# | |
| 2086 | -# This is a Makefile to compile fossil with PellesC from | |
| 2087 | -# http://www.smorgasbordet.com/pellesc/index.htm | |
| 2088 | -# In addition to the Compiler envrionment, you need | |
| 2089 | -# gmake from http://sourceforge.net/projects/unxutils/, Pelles make version | |
| 2090 | -# couldn't handle the complex dependencies in this build | |
| 2091 | -# zlib sources | |
| 2092 | -# Then you do | |
| 2093 | -# 1. create a directory PellesC in the project root directory | |
| 2094 | -# 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation | |
| 2095 | -# 3. open a dos prompt window and change working directory into PellesC (step 1) | |
| 2096 | -# 4. run gmake -f ..\win\Makefile.PellesCGMake | |
| 2097 | -# | |
| 2098 | -# this file is tested with | |
| 2099 | -# PellesC 5.00.13 | |
| 2100 | -# gmake 3.80 | |
| 2101 | -# zlib sources 1.2.5 | |
| 2102 | -# Windows XP SP 2 | |
| 2103 | -# and | |
| 2104 | -# PellesC 6.00.4 | |
| 2105 | -# gmake 3.80 | |
| 2106 | -# zlib sources 1.2.5 | |
| 2107 | -# Windows 7 Home Premium | |
| 2108 | -# | |
| 2109 | - | |
| 2110 | -# | |
| 2111 | -PellesCDir=c:\Programme\PellesC | |
| 2112 | - | |
| 2113 | -# Select between 32/64 bit code, default is 32 bit | |
| 2114 | -#TARGETVERSION=64 | |
| 2115 | - | |
| 2116 | -ifeq ($(TARGETVERSION),64) | |
| 2117 | -# 64 bit version | |
| 2118 | -TARGETMACHINE_CC=amd64 | |
| 2119 | -TARGETMACHINE_LN=amd64 | |
| 2120 | -TARGETEXTEND=64 | |
| 2121 | -else | |
| 2122 | -# 32 bit version | |
| 2123 | -TARGETMACHINE_CC=x86 | |
| 2124 | -TARGETMACHINE_LN=ix86 | |
| 2125 | -TARGETEXTEND= | |
| 2126 | -endif | |
| 2127 | - | |
| 2128 | -# define the project directories | |
| 2129 | -B=.. | |
| 2130 | -SRCDIR=$(B)/src/ | |
| 2131 | -SRCDIR_extsrc=$(B)/extsrc/ | |
| 2132 | -SRCDIR_tools=$(B)/tools/ | |
| 2133 | -WINDIR=$(B)/win/ | |
| 2134 | -ZLIBSRCDIR=../../zlib/ | |
| 2135 | - | |
| 2136 | -# define linker command and options | |
| 2137 | -LINK=$(PellesCDir)/bin/polink.exe | |
| 2138 | -LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib dnsapi.lib Crtmt$(TARGETEXTEND).lib | |
| 2139 | - | |
| 2140 | -# define standard C-compiler and flags, used to compile | |
| 2141 | -# the fossil binary. Some special definitions follow for | |
| 2142 | -# special files follow | |
| 2143 | -CC=$(PellesCDir)\bin\pocc.exe | |
| 2144 | -DEFINES=-D_pgmptr=g.argv[0] | |
| 2145 | -CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) | |
| 2146 | -INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) /I $(SRCDIR_extsrc) | |
| 2147 | - | |
| 2148 | -# define commands for building the windows resource files | |
| 2149 | -RESOURCE=fossil.res | |
| 2150 | -RC=$(PellesCDir)\bin\porc.exe | |
| 2151 | -RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) | |
| 2152 | - | |
| 2153 | -# define the special utilities files, needed to generate | |
| 2154 | -# the automatically generated source files | |
| 2155 | -UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe | |
| 2156 | -UTILS_OBJ=$(UTILS:.exe=.obj) | |
| 2157 | -UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR_tools)$(uf:.exe=.c)) | |
| 2158 | - | |
| 2159 | -# define the SQLite files, which need special flags on compile | |
| 2160 | -SQLITESRC=sqlite3.c | |
| 2161 | -ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR_extsrc)$(sf)) | |
| 2162 | -SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) | |
| 2163 | -SQLITEDEFINES=<<<SQLITE_OPTIONS>>> | |
| 2164 | - | |
| 2165 | -# define the SQLite shell files, which need special flags on compile | |
| 2166 | -SQLITESHELLSRC=shell.c | |
| 2167 | -ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR_extsrc)$(sf)) | |
| 2168 | -SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) | |
| 2169 | -SQLITESHELLDEFINES=<<<SHELL_OPTIONS>>> | |
| 2170 | - | |
| 2171 | -# define the th scripting files, which need special flags on compile | |
| 2172 | -THSRC=th.c th_lang.c | |
| 2173 | -ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) | |
| 2174 | -THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) | |
| 2175 | - | |
| 2176 | -# define the zlib files, needed by this compile | |
| 2177 | -ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c | |
| 2178 | -ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf)) | |
| 2179 | -ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) | |
| 2180 | - | |
| 2181 | -# define all fossil sources, using the standard compile and | |
| 2182 | -# source generation. These are all files in SRCDIR, which are not | |
| 2183 | -# mentioned as special files above: | |
| 2184 | -ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) | |
| 2185 | -SRC=$(subst $(SRCDIR),,$(ORIGSRC)) | |
| 2186 | -TRANSLATEDSRC=$(SRC:.c=_.c) | |
| 2187 | -TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) | |
| 2188 | - | |
| 2189 | -# main target file is the application | |
| 2190 | -APPLICATION=fossil.exe | |
| 2191 | - | |
| 2192 | -# define the standard make target | |
| 2193 | -.PHONY: default | |
| 2194 | -default: page_index.h builtin_data.h headers $(APPLICATION) | |
| 2195 | - | |
| 2196 | -# symbolic target to generate the source generate utils | |
| 2197 | -.PHONY: utils | |
| 2198 | -utils: $(UTILS) | |
| 2199 | - | |
| 2200 | -# link utils | |
| 2201 | -$(UTILS) version.exe: %.exe: %.obj | |
| 2202 | - $(LINK) $(LINKFLAGS) -out:"$@" $< | |
| 2203 | - | |
| 2204 | -# compiling standard fossil utils | |
| 2205 | -$(UTILS_OBJ): %.obj: $(SRCDIR)%.c | |
| 2206 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 2207 | - | |
| 2208 | -# compile special windows utils | |
| 2209 | -version.obj: $(SRCDIR_tools)mkversion.c | |
| 2210 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 2211 | - | |
| 2212 | -# generate the translated c-source files | |
| 2213 | -$(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe | |
| 2214 | - translate.exe $< >$@ | |
| 2215 | - | |
| 2216 | -# generate the index source, containing all web references,.. | |
| 2217 | -page_index.h: $(TRANSLATEDSRC) mkindex.exe | |
| 2218 | - mkindex.exe $(TRANSLATEDSRC) >$@ | |
| 2219 | - | |
| 2220 | -builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe | |
| 2221 | - mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@ | |
| 2222 | - | |
| 2223 | -# extracting version info from manifest | |
| 2224 | -VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION | |
| 2225 | - version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@ | |
| 2226 | - | |
| 2227 | -# generate the simplified headers | |
| 2228 | -headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/extsrc/sqlite3.h ../src/th.h | |
| 2229 | - makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/extsrc/sqlite3.h ../src/th.h VERSION.h | |
| 2230 | - echo Done >$@ | |
| 2231 | - | |
| 2232 | -# compile C sources with relevant options | |
| 2233 | - | |
| 2234 | -$(TRANSLATEDOBJ): %_.obj: %_.c %.h | |
| 2235 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 2236 | - | |
| 2237 | -$(SQLITEOBJ): %.obj: $(SRCDIR_extsrc)%.c $(SRCDIR_extsrc)%.h | |
| 2238 | - $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" | |
| 2239 | - | |
| 2240 | -$(SQLITESHELLOBJ): %.obj: $(SRCDIR_extsrc)%.c | |
| 2241 | - $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" | |
| 2242 | - | |
| 2243 | -$(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h | |
| 2244 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 2245 | - | |
| 2246 | -$(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c | |
| 2247 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 2248 | - | |
| 2249 | -# create the windows resource with icon and version info | |
| 2250 | -$(RESOURCE): %.res: ../win/%.rc ../win/*.ico | |
| 2251 | - $(RC) $(RCFLAGS) $< -Fo"$@" | |
| 2252 | - | |
| 2253 | -# link the application | |
| 2254 | -$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) | |
| 2255 | - $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) | |
| 2256 | - | |
| 2257 | -# cleanup | |
| 2258 | - | |
| 2259 | -.PHONY: clean | |
| 2260 | -clean: | |
| 2261 | - -del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj | |
| 2262 | - -del /F $(TRANSLATEDSRC) | |
| 2263 | - -del /F *.h headers | |
| 2264 | - -del /F $(RESOURCE) | |
| 2265 | - | |
| 2266 | -.PHONY: clobber | |
| 2267 | -clobber: clean | |
| 2268 | - -del /F *.exe | |
| 2269 | -}] | |
| 2270 | 2065 | |
| 2271 | 2066 | DELETED win/Makefile.PellesCGMake |
| --- tools/makemake.tcl | |
| +++ tools/makemake.tcl | |
| @@ -2060,210 +2060,5 @@ | |
| 2060 | close $output_file |
| 2061 | # |
| 2062 | # End of the win/Makefile.msc output |
| 2063 | ############################################################################## |
| 2064 | ############################################################################## |
| 2065 | ############################################################################## |
| 2066 | # Begin win/Makefile.PellesCGMake output |
| 2067 | # |
| 2068 | puts "building ../win/Makefile.PellesCGMake" |
| 2069 | set output_file [open ../win/Makefile.PellesCGMake w] |
| 2070 | fconfigure $output_file -translation binary |
| 2071 | |
| 2072 | writeln [string map [list \ |
| 2073 | <<<SQLITE_OPTIONS>>> [join $SQLITE_WIN32_OPTIONS { }] \ |
| 2074 | <<<SHELL_OPTIONS>>> [join $SHELL_WIN32_OPTIONS { }]] {# |
| 2075 | ############################################################################## |
| 2076 | # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "tools/makemake.tcl") |
| 2077 | ############################################################################## |
| 2078 | # |
| 2079 | # This file is automatically generated. Instead of editing this |
| 2080 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 2081 | # to regenerate this file. |
| 2082 | # |
| 2083 | # HowTo |
| 2084 | # ----- |
| 2085 | # |
| 2086 | # This is a Makefile to compile fossil with PellesC from |
| 2087 | # http://www.smorgasbordet.com/pellesc/index.htm |
| 2088 | # In addition to the Compiler envrionment, you need |
| 2089 | # gmake from http://sourceforge.net/projects/unxutils/, Pelles make version |
| 2090 | # couldn't handle the complex dependencies in this build |
| 2091 | # zlib sources |
| 2092 | # Then you do |
| 2093 | # 1. create a directory PellesC in the project root directory |
| 2094 | # 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation |
| 2095 | # 3. open a dos prompt window and change working directory into PellesC (step 1) |
| 2096 | # 4. run gmake -f ..\win\Makefile.PellesCGMake |
| 2097 | # |
| 2098 | # this file is tested with |
| 2099 | # PellesC 5.00.13 |
| 2100 | # gmake 3.80 |
| 2101 | # zlib sources 1.2.5 |
| 2102 | # Windows XP SP 2 |
| 2103 | # and |
| 2104 | # PellesC 6.00.4 |
| 2105 | # gmake 3.80 |
| 2106 | # zlib sources 1.2.5 |
| 2107 | # Windows 7 Home Premium |
| 2108 | # |
| 2109 | |
| 2110 | # |
| 2111 | PellesCDir=c:\Programme\PellesC |
| 2112 | |
| 2113 | # Select between 32/64 bit code, default is 32 bit |
| 2114 | #TARGETVERSION=64 |
| 2115 | |
| 2116 | ifeq ($(TARGETVERSION),64) |
| 2117 | # 64 bit version |
| 2118 | TARGETMACHINE_CC=amd64 |
| 2119 | TARGETMACHINE_LN=amd64 |
| 2120 | TARGETEXTEND=64 |
| 2121 | else |
| 2122 | # 32 bit version |
| 2123 | TARGETMACHINE_CC=x86 |
| 2124 | TARGETMACHINE_LN=ix86 |
| 2125 | TARGETEXTEND= |
| 2126 | endif |
| 2127 | |
| 2128 | # define the project directories |
| 2129 | B=.. |
| 2130 | SRCDIR=$(B)/src/ |
| 2131 | SRCDIR_extsrc=$(B)/extsrc/ |
| 2132 | SRCDIR_tools=$(B)/tools/ |
| 2133 | WINDIR=$(B)/win/ |
| 2134 | ZLIBSRCDIR=../../zlib/ |
| 2135 | |
| 2136 | # define linker command and options |
| 2137 | LINK=$(PellesCDir)/bin/polink.exe |
| 2138 | LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib dnsapi.lib Crtmt$(TARGETEXTEND).lib |
| 2139 | |
| 2140 | # define standard C-compiler and flags, used to compile |
| 2141 | # the fossil binary. Some special definitions follow for |
| 2142 | # special files follow |
| 2143 | CC=$(PellesCDir)\bin\pocc.exe |
| 2144 | DEFINES=-D_pgmptr=g.argv[0] |
| 2145 | CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) |
| 2146 | INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) /I $(SRCDIR_extsrc) |
| 2147 | |
| 2148 | # define commands for building the windows resource files |
| 2149 | RESOURCE=fossil.res |
| 2150 | RC=$(PellesCDir)\bin\porc.exe |
| 2151 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 2152 | |
| 2153 | # define the special utilities files, needed to generate |
| 2154 | # the automatically generated source files |
| 2155 | UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe |
| 2156 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 2157 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR_tools)$(uf:.exe=.c)) |
| 2158 | |
| 2159 | # define the SQLite files, which need special flags on compile |
| 2160 | SQLITESRC=sqlite3.c |
| 2161 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR_extsrc)$(sf)) |
| 2162 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 2163 | SQLITEDEFINES=<<<SQLITE_OPTIONS>>> |
| 2164 | |
| 2165 | # define the SQLite shell files, which need special flags on compile |
| 2166 | SQLITESHELLSRC=shell.c |
| 2167 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR_extsrc)$(sf)) |
| 2168 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 2169 | SQLITESHELLDEFINES=<<<SHELL_OPTIONS>>> |
| 2170 | |
| 2171 | # define the th scripting files, which need special flags on compile |
| 2172 | THSRC=th.c th_lang.c |
| 2173 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 2174 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 2175 | |
| 2176 | # define the zlib files, needed by this compile |
| 2177 | ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c |
| 2178 | ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf)) |
| 2179 | ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) |
| 2180 | |
| 2181 | # define all fossil sources, using the standard compile and |
| 2182 | # source generation. These are all files in SRCDIR, which are not |
| 2183 | # mentioned as special files above: |
| 2184 | ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) |
| 2185 | SRC=$(subst $(SRCDIR),,$(ORIGSRC)) |
| 2186 | TRANSLATEDSRC=$(SRC:.c=_.c) |
| 2187 | TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) |
| 2188 | |
| 2189 | # main target file is the application |
| 2190 | APPLICATION=fossil.exe |
| 2191 | |
| 2192 | # define the standard make target |
| 2193 | .PHONY: default |
| 2194 | default: page_index.h builtin_data.h headers $(APPLICATION) |
| 2195 | |
| 2196 | # symbolic target to generate the source generate utils |
| 2197 | .PHONY: utils |
| 2198 | utils: $(UTILS) |
| 2199 | |
| 2200 | # link utils |
| 2201 | $(UTILS) version.exe: %.exe: %.obj |
| 2202 | $(LINK) $(LINKFLAGS) -out:"$@" $< |
| 2203 | |
| 2204 | # compiling standard fossil utils |
| 2205 | $(UTILS_OBJ): %.obj: $(SRCDIR)%.c |
| 2206 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 2207 | |
| 2208 | # compile special windows utils |
| 2209 | version.obj: $(SRCDIR_tools)mkversion.c |
| 2210 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 2211 | |
| 2212 | # generate the translated c-source files |
| 2213 | $(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe |
| 2214 | translate.exe $< >$@ |
| 2215 | |
| 2216 | # generate the index source, containing all web references,.. |
| 2217 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 2218 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 2219 | |
| 2220 | builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe |
| 2221 | mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@ |
| 2222 | |
| 2223 | # extracting version info from manifest |
| 2224 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 2225 | version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@ |
| 2226 | |
| 2227 | # generate the simplified headers |
| 2228 | headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/extsrc/sqlite3.h ../src/th.h |
| 2229 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/extsrc/sqlite3.h ../src/th.h VERSION.h |
| 2230 | echo Done >$@ |
| 2231 | |
| 2232 | # compile C sources with relevant options |
| 2233 | |
| 2234 | $(TRANSLATEDOBJ): %_.obj: %_.c %.h |
| 2235 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 2236 | |
| 2237 | $(SQLITEOBJ): %.obj: $(SRCDIR_extsrc)%.c $(SRCDIR_extsrc)%.h |
| 2238 | $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 2239 | |
| 2240 | $(SQLITESHELLOBJ): %.obj: $(SRCDIR_extsrc)%.c |
| 2241 | $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 2242 | |
| 2243 | $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h |
| 2244 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 2245 | |
| 2246 | $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c |
| 2247 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 2248 | |
| 2249 | # create the windows resource with icon and version info |
| 2250 | $(RESOURCE): %.res: ../win/%.rc ../win/*.ico |
| 2251 | $(RC) $(RCFLAGS) $< -Fo"$@" |
| 2252 | |
| 2253 | # link the application |
| 2254 | $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) |
| 2255 | $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) |
| 2256 | |
| 2257 | # cleanup |
| 2258 | |
| 2259 | .PHONY: clean |
| 2260 | clean: |
| 2261 | -del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj |
| 2262 | -del /F $(TRANSLATEDSRC) |
| 2263 | -del /F *.h headers |
| 2264 | -del /F $(RESOURCE) |
| 2265 | |
| 2266 | .PHONY: clobber |
| 2267 | clobber: clean |
| 2268 | -del /F *.exe |
| 2269 | }] |
| 2270 | |
| 2271 | ELETED win/Makefile.PellesCGMake |
| --- tools/makemake.tcl | |
| +++ tools/makemake.tcl | |
| @@ -2060,210 +2060,5 @@ | |
| 2060 | close $output_file |
| 2061 | # |
| 2062 | # End of the win/Makefile.msc output |
| 2063 | ############################################################################## |
| 2064 | ############################################################################## |
| 2065 | |
| 2066 | ELETED win/Makefile.PellesCGMake |
D
win/Makefile.PellesCGMake
-196
| --- a/win/Makefile.PellesCGMake | ||
| +++ b/win/Makefile.PellesCGMake | ||
| @@ -1,196 +0,0 @@ | ||
| 1 | -# | |
| 2 | -############################################################################## | |
| 3 | -# WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "tools/makemake.tcl") | |
| 4 | -############################################################################## | |
| 5 | -# | |
| 6 | -# This file is automatically generated. Instead of editing this | |
| 7 | -# file, edit "makemake.tcl" then run "tclsh makemake.tcl" | |
| 8 | -# to regenerate this file. | |
| 9 | -# | |
| 10 | -# HowTo | |
| 11 | -# ----- | |
| 12 | -# | |
| 13 | -# This is a Makefile to compile fossil with PellesC from | |
| 14 | -# http://www.smorgasbordet.com/pellesc/index.htm | |
| 15 | -# In addition to the Compiler envrionment, you need | |
| 16 | -# gmake from http://sourceforge.net/projects/unxutils/, Pelles make version | |
| 17 | -# couldn't handle the complex dependencies in this build | |
| 18 | -# zlib sources | |
| 19 | -# Then you do | |
| 20 | -# 1. create a directory PellesC in the project root directory | |
| 21 | -# 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation | |
| 22 | -# 3. open a dos prompt window and change working directory into PellesC (step 1) | |
| 23 | -# 4. run gmake -f ..\win\Makefile.PellesCGMake | |
| 24 | -# | |
| 25 | -# this file is tested with | |
| 26 | -# PellesC 5.00.13 | |
| 27 | -# gmake 3.80 | |
| 28 | -# zlib sources 1.2.5 | |
| 29 | -# Windows XP SP 2 | |
| 30 | -# and | |
| 31 | -# PellesC 6.00.4 | |
| 32 | -# gmake 3.80 | |
| 33 | -# zlib sources 1.2.5 | |
| 34 | -# Windows 7 Home Premium | |
| 35 | -# | |
| 36 | - | |
| 37 | -# | |
| 38 | -PellesCDir=c:\Programme\PellesC | |
| 39 | - | |
| 40 | -# Select between 32/64 bit code, default is 32 bit | |
| 41 | -#TARGETVERSION=64 | |
| 42 | - | |
| 43 | -ifeq ($(TARGETVERSION),64) | |
| 44 | -# 64 bit version | |
| 45 | -TARGETMACHINE_CC=amd64 | |
| 46 | -TARGETMACHINE_LN=amd64 | |
| 47 | -TARGETEXTEND=64 | |
| 48 | -else | |
| 49 | -# 32 bit version | |
| 50 | -TARGETMACHINE_CC=x86 | |
| 51 | -TARGETMACHINE_LN=ix86 | |
| 52 | -TARGETEXTEND= | |
| 53 | -endif | |
| 54 | - | |
| 55 | -# define the project directories | |
| 56 | -B=.. | |
| 57 | -SRCDIR=$(B)/src/ | |
| 58 | -SRCDIR_extsrc=$(B)/extsrc/ | |
| 59 | -SRCDIR_tools=$(B)/tools/ | |
| 60 | -WINDIR=$(B)/win/ | |
| 61 | -ZLIBSRCDIR=../../zlib/ | |
| 62 | - | |
| 63 | -# define linker command and options | |
| 64 | -LINK=$(PellesCDir)/bin/polink.exe | |
| 65 | -LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib dnsapi.lib Crtmt$(TARGETEXTEND).lib | |
| 66 | - | |
| 67 | -# define standard C-compiler and flags, used to compile | |
| 68 | -# the fossil binary. Some special definitions follow for | |
| 69 | -# special files follow | |
| 70 | -CC=$(PellesCDir)\bin\pocc.exe | |
| 71 | -DEFINES=-D_pgmptr=g.argv[0] | |
| 72 | -CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) | |
| 73 | -INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) /I $(SRCDIR_extsrc) | |
| 74 | - | |
| 75 | -# define commands for building the windows resource files | |
| 76 | -RESOURCE=fossil.res | |
| 77 | -RC=$(PellesCDir)\bin\porc.exe | |
| 78 | -RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) | |
| 79 | - | |
| 80 | -# define the special utilities files, needed to generate | |
| 81 | -# the automatically generated source files | |
| 82 | -UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe | |
| 83 | -UTILS_OBJ=$(UTILS:.exe=.obj) | |
| 84 | -UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR_tools)$(uf:.exe=.c)) | |
| 85 | - | |
| 86 | -# define the SQLite files, which need special flags on compile | |
| 87 | -SQLITESRC=sqlite3.c | |
| 88 | -ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR_extsrc)$(sf)) | |
| 89 | -SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) | |
| 90 | -SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 -DSQLITE_WIN32_NO_ANSI | |
| 91 | - | |
| 92 | -# define the SQLite shell files, which need special flags on compile | |
| 93 | -SQLITESHELLSRC=shell.c | |
| 94 | -ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR_extsrc)$(sf)) | |
| 95 | -SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) | |
| 96 | -SQLITESHELLDEFINES=-DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=sqlcmd_get_dbname -DSQLITE_SHELL_INIT_PROC=sqlcmd_init_proc -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | |
| 97 | - | |
| 98 | -# define the th scripting files, which need special flags on compile | |
| 99 | -THSRC=th.c th_lang.c | |
| 100 | -ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) | |
| 101 | -THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) | |
| 102 | - | |
| 103 | -# define the zlib files, needed by this compile | |
| 104 | -ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c | |
| 105 | -ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf)) | |
| 106 | -ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) | |
| 107 | - | |
| 108 | -# define all fossil sources, using the standard compile and | |
| 109 | -# source generation. These are all files in SRCDIR, which are not | |
| 110 | -# mentioned as special files above: | |
| 111 | -ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) | |
| 112 | -SRC=$(subst $(SRCDIR),,$(ORIGSRC)) | |
| 113 | -TRANSLATEDSRC=$(SRC:.c=_.c) | |
| 114 | -TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) | |
| 115 | - | |
| 116 | -# main target file is the application | |
| 117 | -APPLICATION=fossil.exe | |
| 118 | - | |
| 119 | -# define the standard make target | |
| 120 | -.PHONY: default | |
| 121 | -default: page_index.h builtin_data.h headers $(APPLICATION) | |
| 122 | - | |
| 123 | -# symbolic target to generate the source generate utils | |
| 124 | -.PHONY: utils | |
| 125 | -utils: $(UTILS) | |
| 126 | - | |
| 127 | -# link utils | |
| 128 | -$(UTILS) version.exe: %.exe: %.obj | |
| 129 | - $(LINK) $(LINKFLAGS) -out:"$@" $< | |
| 130 | - | |
| 131 | -# compiling standard fossil utils | |
| 132 | -$(UTILS_OBJ): %.obj: $(SRCDIR)%.c | |
| 133 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 134 | - | |
| 135 | -# compile special windows utils | |
| 136 | -version.obj: $(SRCDIR_tools)mkversion.c | |
| 137 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 138 | - | |
| 139 | -# generate the translated c-source files | |
| 140 | -$(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe | |
| 141 | - translate.exe $< >$@ | |
| 142 | - | |
| 143 | -# generate the index source, containing all web references,.. | |
| 144 | -page_index.h: $(TRANSLATEDSRC) mkindex.exe | |
| 145 | - mkindex.exe $(TRANSLATEDSRC) >$@ | |
| 146 | - | |
| 147 | -builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe | |
| 148 | - mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@ | |
| 149 | - | |
| 150 | -# extracting version info from manifest | |
| 151 | -VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION | |
| 152 | - version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@ | |
| 153 | - | |
| 154 | -# generate the simplified headers | |
| 155 | -headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/extsrc/sqlite3.h ../src/th.h | |
| 156 | - makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/extsrc/sqlite3.h ../src/th.h VERSION.h | |
| 157 | - echo Done >$@ | |
| 158 | - | |
| 159 | -# compile C sources with relevant options | |
| 160 | - | |
| 161 | -$(TRANSLATEDOBJ): %_.obj: %_.c %.h | |
| 162 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 163 | - | |
| 164 | -$(SQLITEOBJ): %.obj: $(SRCDIR_extsrc)%.c $(SRCDIR_extsrc)%.h | |
| 165 | - $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" | |
| 166 | - | |
| 167 | -$(SQLITESHELLOBJ): %.obj: $(SRCDIR_extsrc)%.c | |
| 168 | - $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" | |
| 169 | - | |
| 170 | -$(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h | |
| 171 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 172 | - | |
| 173 | -$(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c | |
| 174 | - $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 175 | - | |
| 176 | -# create the windows resource with icon and version info | |
| 177 | -$(RESOURCE): %.res: ../win/%.rc ../win/*.ico | |
| 178 | - $(RC) $(RCFLAGS) $< -Fo"$@" | |
| 179 | - | |
| 180 | -# link the application | |
| 181 | -$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) | |
| 182 | - $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) | |
| 183 | - | |
| 184 | -# cleanup | |
| 185 | - | |
| 186 | -.PHONY: clean | |
| 187 | -clean: | |
| 188 | - -del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj | |
| 189 | - -del /F $(TRANSLATEDSRC) | |
| 190 | - -del /F *.h headers | |
| 191 | - -del /F $(RESOURCE) | |
| 192 | - | |
| 193 | -.PHONY: clobber | |
| 194 | -clobber: clean | |
| 195 | - -del /F *.exe | |
| 196 | - |
| --- a/win/Makefile.PellesCGMake | |
| +++ b/win/Makefile.PellesCGMake | |
| @@ -1,196 +0,0 @@ | |
| 1 | # |
| 2 | ############################################################################## |
| 3 | # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "tools/makemake.tcl") |
| 4 | ############################################################################## |
| 5 | # |
| 6 | # This file is automatically generated. Instead of editing this |
| 7 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 8 | # to regenerate this file. |
| 9 | # |
| 10 | # HowTo |
| 11 | # ----- |
| 12 | # |
| 13 | # This is a Makefile to compile fossil with PellesC from |
| 14 | # http://www.smorgasbordet.com/pellesc/index.htm |
| 15 | # In addition to the Compiler envrionment, you need |
| 16 | # gmake from http://sourceforge.net/projects/unxutils/, Pelles make version |
| 17 | # couldn't handle the complex dependencies in this build |
| 18 | # zlib sources |
| 19 | # Then you do |
| 20 | # 1. create a directory PellesC in the project root directory |
| 21 | # 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation |
| 22 | # 3. open a dos prompt window and change working directory into PellesC (step 1) |
| 23 | # 4. run gmake -f ..\win\Makefile.PellesCGMake |
| 24 | # |
| 25 | # this file is tested with |
| 26 | # PellesC 5.00.13 |
| 27 | # gmake 3.80 |
| 28 | # zlib sources 1.2.5 |
| 29 | # Windows XP SP 2 |
| 30 | # and |
| 31 | # PellesC 6.00.4 |
| 32 | # gmake 3.80 |
| 33 | # zlib sources 1.2.5 |
| 34 | # Windows 7 Home Premium |
| 35 | # |
| 36 | |
| 37 | # |
| 38 | PellesCDir=c:\Programme\PellesC |
| 39 | |
| 40 | # Select between 32/64 bit code, default is 32 bit |
| 41 | #TARGETVERSION=64 |
| 42 | |
| 43 | ifeq ($(TARGETVERSION),64) |
| 44 | # 64 bit version |
| 45 | TARGETMACHINE_CC=amd64 |
| 46 | TARGETMACHINE_LN=amd64 |
| 47 | TARGETEXTEND=64 |
| 48 | else |
| 49 | # 32 bit version |
| 50 | TARGETMACHINE_CC=x86 |
| 51 | TARGETMACHINE_LN=ix86 |
| 52 | TARGETEXTEND= |
| 53 | endif |
| 54 | |
| 55 | # define the project directories |
| 56 | B=.. |
| 57 | SRCDIR=$(B)/src/ |
| 58 | SRCDIR_extsrc=$(B)/extsrc/ |
| 59 | SRCDIR_tools=$(B)/tools/ |
| 60 | WINDIR=$(B)/win/ |
| 61 | ZLIBSRCDIR=../../zlib/ |
| 62 | |
| 63 | # define linker command and options |
| 64 | LINK=$(PellesCDir)/bin/polink.exe |
| 65 | LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib dnsapi.lib Crtmt$(TARGETEXTEND).lib |
| 66 | |
| 67 | # define standard C-compiler and flags, used to compile |
| 68 | # the fossil binary. Some special definitions follow for |
| 69 | # special files follow |
| 70 | CC=$(PellesCDir)\bin\pocc.exe |
| 71 | DEFINES=-D_pgmptr=g.argv[0] |
| 72 | CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) |
| 73 | INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) /I $(SRCDIR_extsrc) |
| 74 | |
| 75 | # define commands for building the windows resource files |
| 76 | RESOURCE=fossil.res |
| 77 | RC=$(PellesCDir)\bin\porc.exe |
| 78 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 79 | |
| 80 | # define the special utilities files, needed to generate |
| 81 | # the automatically generated source files |
| 82 | UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe |
| 83 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 84 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR_tools)$(uf:.exe=.c)) |
| 85 | |
| 86 | # define the SQLite files, which need special flags on compile |
| 87 | SQLITESRC=sqlite3.c |
| 88 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR_extsrc)$(sf)) |
| 89 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 90 | SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 -DSQLITE_WIN32_NO_ANSI |
| 91 | |
| 92 | # define the SQLite shell files, which need special flags on compile |
| 93 | SQLITESHELLSRC=shell.c |
| 94 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR_extsrc)$(sf)) |
| 95 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 96 | SQLITESHELLDEFINES=-DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=sqlcmd_get_dbname -DSQLITE_SHELL_INIT_PROC=sqlcmd_init_proc -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 97 | |
| 98 | # define the th scripting files, which need special flags on compile |
| 99 | THSRC=th.c th_lang.c |
| 100 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 101 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 102 | |
| 103 | # define the zlib files, needed by this compile |
| 104 | ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c |
| 105 | ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf)) |
| 106 | ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) |
| 107 | |
| 108 | # define all fossil sources, using the standard compile and |
| 109 | # source generation. These are all files in SRCDIR, which are not |
| 110 | # mentioned as special files above: |
| 111 | ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) |
| 112 | SRC=$(subst $(SRCDIR),,$(ORIGSRC)) |
| 113 | TRANSLATEDSRC=$(SRC:.c=_.c) |
| 114 | TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) |
| 115 | |
| 116 | # main target file is the application |
| 117 | APPLICATION=fossil.exe |
| 118 | |
| 119 | # define the standard make target |
| 120 | .PHONY: default |
| 121 | default: page_index.h builtin_data.h headers $(APPLICATION) |
| 122 | |
| 123 | # symbolic target to generate the source generate utils |
| 124 | .PHONY: utils |
| 125 | utils: $(UTILS) |
| 126 | |
| 127 | # link utils |
| 128 | $(UTILS) version.exe: %.exe: %.obj |
| 129 | $(LINK) $(LINKFLAGS) -out:"$@" $< |
| 130 | |
| 131 | # compiling standard fossil utils |
| 132 | $(UTILS_OBJ): %.obj: $(SRCDIR)%.c |
| 133 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 134 | |
| 135 | # compile special windows utils |
| 136 | version.obj: $(SRCDIR_tools)mkversion.c |
| 137 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 138 | |
| 139 | # generate the translated c-source files |
| 140 | $(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe |
| 141 | translate.exe $< >$@ |
| 142 | |
| 143 | # generate the index source, containing all web references,.. |
| 144 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 145 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 146 | |
| 147 | builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe |
| 148 | mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@ |
| 149 | |
| 150 | # extracting version info from manifest |
| 151 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 152 | version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@ |
| 153 | |
| 154 | # generate the simplified headers |
| 155 | headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/extsrc/sqlite3.h ../src/th.h |
| 156 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/extsrc/sqlite3.h ../src/th.h VERSION.h |
| 157 | echo Done >$@ |
| 158 | |
| 159 | # compile C sources with relevant options |
| 160 | |
| 161 | $(TRANSLATEDOBJ): %_.obj: %_.c %.h |
| 162 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 163 | |
| 164 | $(SQLITEOBJ): %.obj: $(SRCDIR_extsrc)%.c $(SRCDIR_extsrc)%.h |
| 165 | $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 166 | |
| 167 | $(SQLITESHELLOBJ): %.obj: $(SRCDIR_extsrc)%.c |
| 168 | $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 169 | |
| 170 | $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h |
| 171 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 172 | |
| 173 | $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c |
| 174 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 175 | |
| 176 | # create the windows resource with icon and version info |
| 177 | $(RESOURCE): %.res: ../win/%.rc ../win/*.ico |
| 178 | $(RC) $(RCFLAGS) $< -Fo"$@" |
| 179 | |
| 180 | # link the application |
| 181 | $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) |
| 182 | $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) |
| 183 | |
| 184 | # cleanup |
| 185 | |
| 186 | .PHONY: clean |
| 187 | clean: |
| 188 | -del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj |
| 189 | -del /F $(TRANSLATEDSRC) |
| 190 | -del /F *.h headers |
| 191 | -del /F $(RESOURCE) |
| 192 | |
| 193 | .PHONY: clobber |
| 194 | clobber: clean |
| 195 | -del /F *.exe |
| 196 |
| --- a/win/Makefile.PellesCGMake | |
| +++ b/win/Makefile.PellesCGMake | |
| @@ -1,196 +0,0 @@ | |