Fossil SCM
merged in makemake.tcl updates
Commit
ac5e8fb4c09f22d7202f855cf68ee081de615e2a
Parent
4438e96abc3e57b…
2 files changed
+222
-2
+19
-4
+222
-2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -261,30 +261,38 @@ | ||
| 261 | 261 | puts "\n" |
| 262 | 262 | puts -nonewline "OBJ = " |
| 263 | 263 | foreach s [lsort $src] { |
| 264 | 264 | puts -nonewline "\$(OBJDIR)\\$s\$O " |
| 265 | 265 | } |
| 266 | -puts "\$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O " | |
| 266 | +puts "\$(OBJDIR)\\shell\$O \$(OBJDIR)\\sqlcmd\$O \$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O " | |
| 267 | 267 | puts { |
| 268 | 268 | |
| 269 | +RC=$(DMDIR)\bin\rcc | |
| 270 | +RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ | |
| 271 | + | |
| 269 | 272 | APPNAME = $(OBJDIR)\fossil$(E) |
| 270 | 273 | |
| 271 | 274 | all: $(APPNAME) |
| 272 | 275 | |
| 273 | 276 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 274 | 277 | cd $(OBJDIR) |
| 275 | 278 | $(DMDIR)\bin\link @link |
| 279 | + | |
| 280 | +fossil.res: $B\win\fossil.rc | |
| 281 | + $(RC) $(RCFLAGS) -o$@ $** | |
| 276 | 282 | |
| 277 | 283 | $(OBJDIR)\link: $B\win\Makefile.dmc} |
| 278 | 284 | puts -nonewline "\t+echo " |
| 279 | 285 | foreach s [lsort $src] { |
| 280 | 286 | puts -nonewline "$s " |
| 281 | 287 | } |
| 282 | -puts "sqlite3 th th_lang > \$@" | |
| 288 | +puts "shell sqlcmd sqlite3 th th_lang > \$@" | |
| 283 | 289 | puts "\t+echo fossil >> \$@" |
| 284 | 290 | puts "\t+echo fossil >> \$@" |
| 285 | 291 | puts "\t+echo \$(LIBS) >> \$@\n\n" |
| 292 | +puts "\t+echo. >> \$@\n\n" | |
| 293 | +puts "\t+echo fossil >> \$@\n\n" | |
| 286 | 294 | |
| 287 | 295 | puts { |
| 288 | 296 | translate$E: $(SRCDIR)\translate.c |
| 289 | 297 | $(BCC) -o$@ $** |
| 290 | 298 | |
| @@ -295,10 +303,16 @@ | ||
| 295 | 303 | $(BCC) -o$@ $** |
| 296 | 304 | |
| 297 | 305 | version$E: $B\win\version.c |
| 298 | 306 | $(BCC) -o$@ $** |
| 299 | 307 | |
| 308 | +$(OBJDIR)\shell$O : $(SRCDIR)\shell.c | |
| 309 | + $(TCC) -o$@ -c -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $** | |
| 310 | + | |
| 311 | +$(OBJDIR)\sqlcmd$O : $(SRCDIR)\sqlcmd.c | |
| 312 | + $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $** | |
| 313 | + | |
| 300 | 314 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 301 | 315 | $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $** |
| 302 | 316 | |
| 303 | 317 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 304 | 318 | $(TCC) -o$@ -c $** |
| @@ -461,5 +475,211 @@ | ||
| 461 | 475 | } |
| 462 | 476 | puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h" |
| 463 | 477 | puts "\t@copy /Y nul: headers" |
| 464 | 478 | |
| 465 | 479 | } |
| 480 | +if { "pellesc" == [lindex $argv 0] } { | |
| 481 | + | |
| 482 | +puts {# DO NOT EDIT | |
| 483 | +# | |
| 484 | +# This file is automatically generated. Instead of editing this | |
| 485 | +# file, edit "makemake.tcl" then run | |
| 486 | +# "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake" | |
| 487 | +# to regenerate this file. | |
| 488 | +# ########################################################################### | |
| 489 | +# | |
| 490 | +# HowTo | |
| 491 | +# ----- | |
| 492 | +# | |
| 493 | +# This is a Makefile to compile fossil with PellesC from | |
| 494 | +# http://www.smorgasbordet.com/pellesc/index.htm | |
| 495 | +# In addition to the Compiler envrionment, you need | |
| 496 | +# gmake from http://sourceforge.net/projects/unxutils/, Pelles make version | |
| 497 | +# couldn't handle the complex dependencies in this build | |
| 498 | +# zlib sources | |
| 499 | +# Then you do | |
| 500 | +# 1. create a directory PellesC in the project root directory | |
| 501 | +# 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation | |
| 502 | +# 3. open a dos prompt window and change working directory into PellesC (step 1) | |
| 503 | +# 4. run gmake -f ..\win\Makefile.PellesCGMake | |
| 504 | +# | |
| 505 | +# this file is tested with | |
| 506 | +# PellesC 5.00.13 | |
| 507 | +# gmake 3.80 | |
| 508 | +# zlib sources 1.2.5 | |
| 509 | +# Windows XP SP 2 | |
| 510 | +# and | |
| 511 | +# PellesC 6.00.4 | |
| 512 | +# gmake 3.80 | |
| 513 | +# zlib sources 1.2.5 | |
| 514 | +# Windows 7 Home Premium | |
| 515 | +# | |
| 516 | +# ########################################################################### | |
| 517 | + | |
| 518 | +# | |
| 519 | +PellesCDir=c:\Programme\PellesC | |
| 520 | + | |
| 521 | +# Select between 32/64 bit code, default is 32 bit | |
| 522 | +#TARGETVERSION=64 | |
| 523 | + | |
| 524 | +ifeq ($(TARGETVERSION),64) | |
| 525 | +# 64 bit version | |
| 526 | +TARGETMACHINE_CC=amd64 | |
| 527 | +TARGETMACHINE_LN=amd64 | |
| 528 | +TARGETEXTEND=64 | |
| 529 | +else | |
| 530 | +# 32 bit version | |
| 531 | +TARGETMACHINE_CC=x86 | |
| 532 | +TARGETMACHINE_LN=ix86 | |
| 533 | +TARGETEXTEND= | |
| 534 | +endif | |
| 535 | + | |
| 536 | +# define the project directories | |
| 537 | +B=.. | |
| 538 | +SRCDIR=$(B)/src/ | |
| 539 | +WINDIR=$(B)/win/ | |
| 540 | +ZLIBSRCDIR=../../zlib/ | |
| 541 | + | |
| 542 | +# define linker command and options | |
| 543 | +LINK=$(PellesCDir)/bin/polink.exe | |
| 544 | +LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib Crtmt$(TARGETEXTEND).lib | |
| 545 | + | |
| 546 | +# define standard C-compiler and flags, used to compile | |
| 547 | +# the fossil binary. Some special definitions follow for | |
| 548 | +# special files follow | |
| 549 | +CC=$(PellesCDir)\bin\pocc.exe | |
| 550 | +DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp -D_pgmptr=g.argv[0] | |
| 551 | +CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) | |
| 552 | +INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) | |
| 553 | + | |
| 554 | +# define commands for building the windows resource files | |
| 555 | +RESOURCE=fossil.res | |
| 556 | +RC=$(PellesCDir)\bin\porc.exe | |
| 557 | +RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) | |
| 558 | + | |
| 559 | +# define the special utilities files, needed to generate | |
| 560 | +# the automatically generated source files | |
| 561 | +UTILS=translate.exe mkindex.exe makeheaders.exe | |
| 562 | +UTILS_OBJ=$(UTILS:.exe=.obj) | |
| 563 | +UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) | |
| 564 | + | |
| 565 | +# define the sqlite files, which need special flags on compile | |
| 566 | +SQLITESRC=sqlite3.c | |
| 567 | +ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) | |
| 568 | +SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) | |
| 569 | +SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 | |
| 570 | + | |
| 571 | +# define the sqlite shell files, which need special flags on compile | |
| 572 | +SQLITESHELLSRC=shell.c | |
| 573 | +ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) | |
| 574 | +SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) | |
| 575 | +SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 | |
| 576 | + | |
| 577 | +# define the th scripting files, which need special flags on compile | |
| 578 | +THSRC=th.c th_lang.c | |
| 579 | +ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) | |
| 580 | +THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) | |
| 581 | + | |
| 582 | +# define the zlib files, needed by this compile | |
| 583 | +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 | |
| 584 | +ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf)) | |
| 585 | +ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) | |
| 586 | + | |
| 587 | +# define all fossil sources, using the standard compile and | |
| 588 | +# source generation. These are all files in SRCDIR, which are not | |
| 589 | +# mentioned as special files above: | |
| 590 | +ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) | |
| 591 | +SRC=$(subst $(SRCDIR),,$(ORIGSRC)) | |
| 592 | +TRANSLATEDSRC=$(SRC:.c=_.c) | |
| 593 | +TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) | |
| 594 | + | |
| 595 | +# main target file is the application | |
| 596 | +APPLICATION=fossil.exe | |
| 597 | + | |
| 598 | +# ########################################################################### | |
| 599 | +# define the standard make target | |
| 600 | +.PHONY: default | |
| 601 | +default: page_index.h headers $(APPLICATION) | |
| 602 | + | |
| 603 | +# ########################################################################### | |
| 604 | +# symbolic target to generate the source generate utils | |
| 605 | +.PHONY: utils | |
| 606 | +utils: $(UTILS) | |
| 607 | + | |
| 608 | +# link utils | |
| 609 | +$(UTILS) version.exe: %.exe: %.obj | |
| 610 | + $(LINK) $(LINKFLAGS) -out:"$@" $< | |
| 611 | + | |
| 612 | +# compiling standard fossil utils | |
| 613 | +$(UTILS_OBJ): %.obj: $(SRCDIR)%.c | |
| 614 | + $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 615 | + | |
| 616 | +# compile special windows utils | |
| 617 | +version.obj: $(WINDIR)version.c | |
| 618 | + $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 619 | + | |
| 620 | +# ########################################################################### | |
| 621 | +# generate the translated c-source files | |
| 622 | +$(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe | |
| 623 | + translate.exe $< >$@ | |
| 624 | + | |
| 625 | +# ########################################################################### | |
| 626 | +# generate the index source, containing all web references,.. | |
| 627 | +page_index.h: $(TRANSLATEDSRC) mkindex.exe | |
| 628 | + mkindex.exe $(TRANSLATEDSRC) >$@ | |
| 629 | + | |
| 630 | +# ########################################################################### | |
| 631 | +# extracting version info from manifest | |
| 632 | +VERSION.h: version.exe ..\manifest.uuid ..\manifest | |
| 633 | + version.exe ..\manifest.uuid ..\manifest > $@ | |
| 634 | + | |
| 635 | +# ########################################################################### | |
| 636 | +# generate the simplified headers | |
| 637 | +headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h | |
| 638 | + makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h | |
| 639 | + echo Done >$@ | |
| 640 | + | |
| 641 | +# ########################################################################### | |
| 642 | +# compile C sources with relevant options | |
| 643 | + | |
| 644 | +$(TRANSLATEDOBJ): %_.obj: %_.c %.h | |
| 645 | + $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 646 | + | |
| 647 | +$(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h | |
| 648 | + $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" | |
| 649 | + | |
| 650 | +$(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c | |
| 651 | + $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" | |
| 652 | + | |
| 653 | +$(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h | |
| 654 | + $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 655 | + | |
| 656 | +$(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c | |
| 657 | + $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" | |
| 658 | + | |
| 659 | +# ########################################################################### | |
| 660 | +# create the windows resource with icon and version info | |
| 661 | +$(RESOURCE): %.res: ../win/%.rc ../win/*.ico | |
| 662 | + $(RC) $(RCFLAGS) $< -Fo"$@" | |
| 663 | + | |
| 664 | +# ########################################################################### | |
| 665 | +# link the application | |
| 666 | +$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) | |
| 667 | + $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) | |
| 668 | + | |
| 669 | +# ########################################################################### | |
| 670 | +# cleanup | |
| 671 | + | |
| 672 | +.PHONY: clean | |
| 673 | +clean: | |
| 674 | + del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj | |
| 675 | + del /F $(TRANSLATEDSRC) | |
| 676 | + del /F *.h headers | |
| 677 | + del /F $(RESOURCE) | |
| 678 | + | |
| 679 | +.PHONY: clobber | |
| 680 | +clobber: clean | |
| 681 | + del /F *.exe | |
| 682 | +} | |
| 683 | + | |
| 684 | +} | |
| 685 | + | |
| 466 | 686 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -261,30 +261,38 @@ | |
| 261 | puts "\n" |
| 262 | puts -nonewline "OBJ = " |
| 263 | foreach s [lsort $src] { |
| 264 | puts -nonewline "\$(OBJDIR)\\$s\$O " |
| 265 | } |
| 266 | puts "\$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O " |
| 267 | puts { |
| 268 | |
| 269 | APPNAME = $(OBJDIR)\fossil$(E) |
| 270 | |
| 271 | all: $(APPNAME) |
| 272 | |
| 273 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 274 | cd $(OBJDIR) |
| 275 | $(DMDIR)\bin\link @link |
| 276 | |
| 277 | $(OBJDIR)\link: $B\win\Makefile.dmc} |
| 278 | puts -nonewline "\t+echo " |
| 279 | foreach s [lsort $src] { |
| 280 | puts -nonewline "$s " |
| 281 | } |
| 282 | puts "sqlite3 th th_lang > \$@" |
| 283 | puts "\t+echo fossil >> \$@" |
| 284 | puts "\t+echo fossil >> \$@" |
| 285 | puts "\t+echo \$(LIBS) >> \$@\n\n" |
| 286 | |
| 287 | puts { |
| 288 | translate$E: $(SRCDIR)\translate.c |
| 289 | $(BCC) -o$@ $** |
| 290 | |
| @@ -295,10 +303,16 @@ | |
| 295 | $(BCC) -o$@ $** |
| 296 | |
| 297 | version$E: $B\win\version.c |
| 298 | $(BCC) -o$@ $** |
| 299 | |
| 300 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 301 | $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $** |
| 302 | |
| 303 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 304 | $(TCC) -o$@ -c $** |
| @@ -461,5 +475,211 @@ | |
| 461 | } |
| 462 | puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h" |
| 463 | puts "\t@copy /Y nul: headers" |
| 464 | |
| 465 | } |
| 466 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -261,30 +261,38 @@ | |
| 261 | puts "\n" |
| 262 | puts -nonewline "OBJ = " |
| 263 | foreach s [lsort $src] { |
| 264 | puts -nonewline "\$(OBJDIR)\\$s\$O " |
| 265 | } |
| 266 | puts "\$(OBJDIR)\\shell\$O \$(OBJDIR)\\sqlcmd\$O \$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O " |
| 267 | puts { |
| 268 | |
| 269 | RC=$(DMDIR)\bin\rcc |
| 270 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 271 | |
| 272 | APPNAME = $(OBJDIR)\fossil$(E) |
| 273 | |
| 274 | all: $(APPNAME) |
| 275 | |
| 276 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 277 | cd $(OBJDIR) |
| 278 | $(DMDIR)\bin\link @link |
| 279 | |
| 280 | fossil.res: $B\win\fossil.rc |
| 281 | $(RC) $(RCFLAGS) -o$@ $** |
| 282 | |
| 283 | $(OBJDIR)\link: $B\win\Makefile.dmc} |
| 284 | puts -nonewline "\t+echo " |
| 285 | foreach s [lsort $src] { |
| 286 | puts -nonewline "$s " |
| 287 | } |
| 288 | puts "shell sqlcmd sqlite3 th th_lang > \$@" |
| 289 | puts "\t+echo fossil >> \$@" |
| 290 | puts "\t+echo fossil >> \$@" |
| 291 | puts "\t+echo \$(LIBS) >> \$@\n\n" |
| 292 | puts "\t+echo. >> \$@\n\n" |
| 293 | puts "\t+echo fossil >> \$@\n\n" |
| 294 | |
| 295 | puts { |
| 296 | translate$E: $(SRCDIR)\translate.c |
| 297 | $(BCC) -o$@ $** |
| 298 | |
| @@ -295,10 +303,16 @@ | |
| 303 | $(BCC) -o$@ $** |
| 304 | |
| 305 | version$E: $B\win\version.c |
| 306 | $(BCC) -o$@ $** |
| 307 | |
| 308 | $(OBJDIR)\shell$O : $(SRCDIR)\shell.c |
| 309 | $(TCC) -o$@ -c -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $** |
| 310 | |
| 311 | $(OBJDIR)\sqlcmd$O : $(SRCDIR)\sqlcmd.c |
| 312 | $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $** |
| 313 | |
| 314 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 315 | $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $** |
| 316 | |
| 317 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 318 | $(TCC) -o$@ -c $** |
| @@ -461,5 +475,211 @@ | |
| 475 | } |
| 476 | puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h" |
| 477 | puts "\t@copy /Y nul: headers" |
| 478 | |
| 479 | } |
| 480 | if { "pellesc" == [lindex $argv 0] } { |
| 481 | |
| 482 | puts {# DO NOT EDIT |
| 483 | # |
| 484 | # This file is automatically generated. Instead of editing this |
| 485 | # file, edit "makemake.tcl" then run |
| 486 | # "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake" |
| 487 | # to regenerate this file. |
| 488 | # ########################################################################### |
| 489 | # |
| 490 | # HowTo |
| 491 | # ----- |
| 492 | # |
| 493 | # This is a Makefile to compile fossil with PellesC from |
| 494 | # http://www.smorgasbordet.com/pellesc/index.htm |
| 495 | # In addition to the Compiler envrionment, you need |
| 496 | # gmake from http://sourceforge.net/projects/unxutils/, Pelles make version |
| 497 | # couldn't handle the complex dependencies in this build |
| 498 | # zlib sources |
| 499 | # Then you do |
| 500 | # 1. create a directory PellesC in the project root directory |
| 501 | # 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation |
| 502 | # 3. open a dos prompt window and change working directory into PellesC (step 1) |
| 503 | # 4. run gmake -f ..\win\Makefile.PellesCGMake |
| 504 | # |
| 505 | # this file is tested with |
| 506 | # PellesC 5.00.13 |
| 507 | # gmake 3.80 |
| 508 | # zlib sources 1.2.5 |
| 509 | # Windows XP SP 2 |
| 510 | # and |
| 511 | # PellesC 6.00.4 |
| 512 | # gmake 3.80 |
| 513 | # zlib sources 1.2.5 |
| 514 | # Windows 7 Home Premium |
| 515 | # |
| 516 | # ########################################################################### |
| 517 | |
| 518 | # |
| 519 | PellesCDir=c:\Programme\PellesC |
| 520 | |
| 521 | # Select between 32/64 bit code, default is 32 bit |
| 522 | #TARGETVERSION=64 |
| 523 | |
| 524 | ifeq ($(TARGETVERSION),64) |
| 525 | # 64 bit version |
| 526 | TARGETMACHINE_CC=amd64 |
| 527 | TARGETMACHINE_LN=amd64 |
| 528 | TARGETEXTEND=64 |
| 529 | else |
| 530 | # 32 bit version |
| 531 | TARGETMACHINE_CC=x86 |
| 532 | TARGETMACHINE_LN=ix86 |
| 533 | TARGETEXTEND= |
| 534 | endif |
| 535 | |
| 536 | # define the project directories |
| 537 | B=.. |
| 538 | SRCDIR=$(B)/src/ |
| 539 | WINDIR=$(B)/win/ |
| 540 | ZLIBSRCDIR=../../zlib/ |
| 541 | |
| 542 | # define linker command and options |
| 543 | LINK=$(PellesCDir)/bin/polink.exe |
| 544 | LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib Crtmt$(TARGETEXTEND).lib |
| 545 | |
| 546 | # define standard C-compiler and flags, used to compile |
| 547 | # the fossil binary. Some special definitions follow for |
| 548 | # special files follow |
| 549 | CC=$(PellesCDir)\bin\pocc.exe |
| 550 | DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp -D_pgmptr=g.argv[0] |
| 551 | CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) |
| 552 | INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) |
| 553 | |
| 554 | # define commands for building the windows resource files |
| 555 | RESOURCE=fossil.res |
| 556 | RC=$(PellesCDir)\bin\porc.exe |
| 557 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 558 | |
| 559 | # define the special utilities files, needed to generate |
| 560 | # the automatically generated source files |
| 561 | UTILS=translate.exe mkindex.exe makeheaders.exe |
| 562 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 563 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) |
| 564 | |
| 565 | # define the sqlite files, which need special flags on compile |
| 566 | SQLITESRC=sqlite3.c |
| 567 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 568 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 569 | SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 570 | |
| 571 | # define the sqlite shell files, which need special flags on compile |
| 572 | SQLITESHELLSRC=shell.c |
| 573 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 574 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 575 | SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 576 | |
| 577 | # define the th scripting files, which need special flags on compile |
| 578 | THSRC=th.c th_lang.c |
| 579 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 580 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 581 | |
| 582 | # define the zlib files, needed by this compile |
| 583 | 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 |
| 584 | ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf)) |
| 585 | ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) |
| 586 | |
| 587 | # define all fossil sources, using the standard compile and |
| 588 | # source generation. These are all files in SRCDIR, which are not |
| 589 | # mentioned as special files above: |
| 590 | ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) |
| 591 | SRC=$(subst $(SRCDIR),,$(ORIGSRC)) |
| 592 | TRANSLATEDSRC=$(SRC:.c=_.c) |
| 593 | TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) |
| 594 | |
| 595 | # main target file is the application |
| 596 | APPLICATION=fossil.exe |
| 597 | |
| 598 | # ########################################################################### |
| 599 | # define the standard make target |
| 600 | .PHONY: default |
| 601 | default: page_index.h headers $(APPLICATION) |
| 602 | |
| 603 | # ########################################################################### |
| 604 | # symbolic target to generate the source generate utils |
| 605 | .PHONY: utils |
| 606 | utils: $(UTILS) |
| 607 | |
| 608 | # link utils |
| 609 | $(UTILS) version.exe: %.exe: %.obj |
| 610 | $(LINK) $(LINKFLAGS) -out:"$@" $< |
| 611 | |
| 612 | # compiling standard fossil utils |
| 613 | $(UTILS_OBJ): %.obj: $(SRCDIR)%.c |
| 614 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 615 | |
| 616 | # compile special windows utils |
| 617 | version.obj: $(WINDIR)version.c |
| 618 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 619 | |
| 620 | # ########################################################################### |
| 621 | # generate the translated c-source files |
| 622 | $(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe |
| 623 | translate.exe $< >$@ |
| 624 | |
| 625 | # ########################################################################### |
| 626 | # generate the index source, containing all web references,.. |
| 627 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 628 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 629 | |
| 630 | # ########################################################################### |
| 631 | # extracting version info from manifest |
| 632 | VERSION.h: version.exe ..\manifest.uuid ..\manifest |
| 633 | version.exe ..\manifest.uuid ..\manifest > $@ |
| 634 | |
| 635 | # ########################################################################### |
| 636 | # generate the simplified headers |
| 637 | headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h |
| 638 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h |
| 639 | echo Done >$@ |
| 640 | |
| 641 | # ########################################################################### |
| 642 | # compile C sources with relevant options |
| 643 | |
| 644 | $(TRANSLATEDOBJ): %_.obj: %_.c %.h |
| 645 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 646 | |
| 647 | $(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h |
| 648 | $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 649 | |
| 650 | $(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c |
| 651 | $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 652 | |
| 653 | $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h |
| 654 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 655 | |
| 656 | $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c |
| 657 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 658 | |
| 659 | # ########################################################################### |
| 660 | # create the windows resource with icon and version info |
| 661 | $(RESOURCE): %.res: ../win/%.rc ../win/*.ico |
| 662 | $(RC) $(RCFLAGS) $< -Fo"$@" |
| 663 | |
| 664 | # ########################################################################### |
| 665 | # link the application |
| 666 | $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) |
| 667 | $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) |
| 668 | |
| 669 | # ########################################################################### |
| 670 | # cleanup |
| 671 | |
| 672 | .PHONY: clean |
| 673 | clean: |
| 674 | del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj |
| 675 | del /F $(TRANSLATEDSRC) |
| 676 | del /F *.h headers |
| 677 | del /F $(RESOURCE) |
| 678 | |
| 679 | .PHONY: clobber |
| 680 | clobber: clean |
| 681 | del /F *.exe |
| 682 | } |
| 683 | |
| 684 | } |
| 685 | |
| 686 |
+19
-4
| --- win/Makefile.PellesCGMake | ||
| +++ win/Makefile.PellesCGMake | ||
| @@ -1,5 +1,11 @@ | ||
| 1 | +# DO NOT EDIT | |
| 2 | +# | |
| 3 | +# This file is automatically generated. Instead of editing this | |
| 4 | +# file, edit "makemake.tcl" then run | |
| 5 | +# "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake" | |
| 6 | +# to regenerate this file. | |
| 1 | 7 | # ########################################################################### |
| 2 | 8 | # |
| 3 | 9 | # HowTo |
| 4 | 10 | # ----- |
| 5 | 11 | # |
| @@ -58,11 +64,11 @@ | ||
| 58 | 64 | |
| 59 | 65 | # define standard C-compiler and flags, used to compile |
| 60 | 66 | # the fossil binary. Some special definitions follow for |
| 61 | 67 | # special files follow |
| 62 | 68 | CC=$(PellesCDir)\bin\pocc.exe |
| 63 | -DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp | |
| 69 | +DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp -D_pgmptr=g.argv[0] | |
| 64 | 70 | CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) |
| 65 | 71 | INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) |
| 66 | 72 | |
| 67 | 73 | # define commands for building the windows resource files |
| 68 | 74 | RESOURCE=fossil.res |
| @@ -79,10 +85,16 @@ | ||
| 79 | 85 | SQLITESRC=sqlite3.c |
| 80 | 86 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 81 | 87 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 82 | 88 | SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 83 | 89 | |
| 90 | +# define the sqlite shell files, which need special flags on compile | |
| 91 | +SQLITESHELLSRC=shell.c | |
| 92 | +ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) | |
| 93 | +SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) | |
| 94 | +SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 | |
| 95 | + | |
| 84 | 96 | # define the th scripting files, which need special flags on compile |
| 85 | 97 | THSRC=th.c th_lang.c |
| 86 | 98 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 87 | 99 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 88 | 100 | |
| @@ -92,11 +104,11 @@ | ||
| 92 | 104 | ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) |
| 93 | 105 | |
| 94 | 106 | # define all fossil sources, using the standard compile and |
| 95 | 107 | # source generation. These are all files in SRCDIR, which are not |
| 96 | 108 | # mentioned as special files above: |
| 97 | -ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC),$(wildcard $(SRCDIR)*.c)) | |
| 109 | +ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) | |
| 98 | 110 | SRC=$(subst $(SRCDIR),,$(ORIGSRC)) |
| 99 | 111 | TRANSLATEDSRC=$(SRC:.c=_.c) |
| 100 | 112 | TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) |
| 101 | 113 | |
| 102 | 114 | # main target file is the application |
| @@ -152,10 +164,13 @@ | ||
| 152 | 164 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 153 | 165 | |
| 154 | 166 | $(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h |
| 155 | 167 | $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 156 | 168 | |
| 169 | +$(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c | |
| 170 | + $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" | |
| 171 | + | |
| 157 | 172 | $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h |
| 158 | 173 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 159 | 174 | |
| 160 | 175 | $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c |
| 161 | 176 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| @@ -165,12 +180,12 @@ | ||
| 165 | 180 | $(RESOURCE): %.res: ../win/%.rc ../win/*.ico |
| 166 | 181 | $(RC) $(RCFLAGS) $< -Fo"$@" |
| 167 | 182 | |
| 168 | 183 | # ########################################################################### |
| 169 | 184 | # link the application |
| 170 | -$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) | |
| 171 | - $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) | |
| 185 | +$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) | |
| 186 | + $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) | |
| 172 | 187 | |
| 173 | 188 | # ########################################################################### |
| 174 | 189 | # cleanup |
| 175 | 190 | |
| 176 | 191 | .PHONY: clean |
| 177 | 192 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -1,5 +1,11 @@ | |
| 1 | # ########################################################################### |
| 2 | # |
| 3 | # HowTo |
| 4 | # ----- |
| 5 | # |
| @@ -58,11 +64,11 @@ | |
| 58 | |
| 59 | # define standard C-compiler and flags, used to compile |
| 60 | # the fossil binary. Some special definitions follow for |
| 61 | # special files follow |
| 62 | CC=$(PellesCDir)\bin\pocc.exe |
| 63 | DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp |
| 64 | CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) |
| 65 | INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) |
| 66 | |
| 67 | # define commands for building the windows resource files |
| 68 | RESOURCE=fossil.res |
| @@ -79,10 +85,16 @@ | |
| 79 | SQLITESRC=sqlite3.c |
| 80 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 81 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 82 | SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 83 | |
| 84 | # define the th scripting files, which need special flags on compile |
| 85 | THSRC=th.c th_lang.c |
| 86 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 87 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 88 | |
| @@ -92,11 +104,11 @@ | |
| 92 | ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) |
| 93 | |
| 94 | # define all fossil sources, using the standard compile and |
| 95 | # source generation. These are all files in SRCDIR, which are not |
| 96 | # mentioned as special files above: |
| 97 | ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC),$(wildcard $(SRCDIR)*.c)) |
| 98 | SRC=$(subst $(SRCDIR),,$(ORIGSRC)) |
| 99 | TRANSLATEDSRC=$(SRC:.c=_.c) |
| 100 | TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) |
| 101 | |
| 102 | # main target file is the application |
| @@ -152,10 +164,13 @@ | |
| 152 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 153 | |
| 154 | $(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h |
| 155 | $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 156 | |
| 157 | $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h |
| 158 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 159 | |
| 160 | $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c |
| 161 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| @@ -165,12 +180,12 @@ | |
| 165 | $(RESOURCE): %.res: ../win/%.rc ../win/*.ico |
| 166 | $(RC) $(RCFLAGS) $< -Fo"$@" |
| 167 | |
| 168 | # ########################################################################### |
| 169 | # link the application |
| 170 | $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) |
| 171 | $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) |
| 172 | |
| 173 | # ########################################################################### |
| 174 | # cleanup |
| 175 | |
| 176 | .PHONY: clean |
| 177 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -1,5 +1,11 @@ | |
| 1 | # DO NOT EDIT |
| 2 | # |
| 3 | # This file is automatically generated. Instead of editing this |
| 4 | # file, edit "makemake.tcl" then run |
| 5 | # "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake" |
| 6 | # to regenerate this file. |
| 7 | # ########################################################################### |
| 8 | # |
| 9 | # HowTo |
| 10 | # ----- |
| 11 | # |
| @@ -58,11 +64,11 @@ | |
| 64 | |
| 65 | # define standard C-compiler and flags, used to compile |
| 66 | # the fossil binary. Some special definitions follow for |
| 67 | # special files follow |
| 68 | CC=$(PellesCDir)\bin\pocc.exe |
| 69 | DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp -D_pgmptr=g.argv[0] |
| 70 | CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES) |
| 71 | INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR) |
| 72 | |
| 73 | # define commands for building the windows resource files |
| 74 | RESOURCE=fossil.res |
| @@ -79,10 +85,16 @@ | |
| 85 | SQLITESRC=sqlite3.c |
| 86 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 87 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 88 | SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 89 | |
| 90 | # define the sqlite shell files, which need special flags on compile |
| 91 | SQLITESHELLSRC=shell.c |
| 92 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 93 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 94 | SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 95 | |
| 96 | # define the th scripting files, which need special flags on compile |
| 97 | THSRC=th.c th_lang.c |
| 98 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 99 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 100 | |
| @@ -92,11 +104,11 @@ | |
| 104 | ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj)) |
| 105 | |
| 106 | # define all fossil sources, using the standard compile and |
| 107 | # source generation. These are all files in SRCDIR, which are not |
| 108 | # mentioned as special files above: |
| 109 | ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c)) |
| 110 | SRC=$(subst $(SRCDIR),,$(ORIGSRC)) |
| 111 | TRANSLATEDSRC=$(SRC:.c=_.c) |
| 112 | TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj) |
| 113 | |
| 114 | # main target file is the application |
| @@ -152,10 +164,13 @@ | |
| 164 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 165 | |
| 166 | $(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h |
| 167 | $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 168 | |
| 169 | $(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c |
| 170 | $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@" |
| 171 | |
| 172 | $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h |
| 173 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| 174 | |
| 175 | $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c |
| 176 | $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@" |
| @@ -165,12 +180,12 @@ | |
| 180 | $(RESOURCE): %.res: ../win/%.rc ../win/*.ico |
| 181 | $(RC) $(RCFLAGS) $< -Fo"$@" |
| 182 | |
| 183 | # ########################################################################### |
| 184 | # link the application |
| 185 | $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE) |
| 186 | $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE) |
| 187 | |
| 188 | # ########################################################################### |
| 189 | # cleanup |
| 190 | |
| 191 | .PHONY: clean |
| 192 |