Fossil SCM

merged in makemake.tcl updates

wolfgang 2010-11-25 20:31 trunk merge
Commit ac5e8fb4c09f22d7202f855cf68ee081de615e2a
+222 -2
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -261,30 +261,38 @@
261261
puts "\n"
262262
puts -nonewline "OBJ = "
263263
foreach s [lsort $src] {
264264
puts -nonewline "\$(OBJDIR)\\$s\$O "
265265
}
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 "
267267
puts {
268268
269
+RC=$(DMDIR)\bin\rcc
270
+RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
271
+
269272
APPNAME = $(OBJDIR)\fossil$(E)
270273
271274
all: $(APPNAME)
272275
273276
$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link
274277
cd $(OBJDIR)
275278
$(DMDIR)\bin\link @link
279
+
280
+fossil.res: $B\win\fossil.rc
281
+ $(RC) $(RCFLAGS) -o$@ $**
276282
277283
$(OBJDIR)\link: $B\win\Makefile.dmc}
278284
puts -nonewline "\t+echo "
279285
foreach s [lsort $src] {
280286
puts -nonewline "$s "
281287
}
282
-puts "sqlite3 th th_lang > \$@"
288
+puts "shell sqlcmd sqlite3 th th_lang > \$@"
283289
puts "\t+echo fossil >> \$@"
284290
puts "\t+echo fossil >> \$@"
285291
puts "\t+echo \$(LIBS) >> \$@\n\n"
292
+puts "\t+echo. >> \$@\n\n"
293
+puts "\t+echo fossil >> \$@\n\n"
286294
287295
puts {
288296
translate$E: $(SRCDIR)\translate.c
289297
$(BCC) -o$@ $**
290298
@@ -295,10 +303,16 @@
295303
$(BCC) -o$@ $**
296304
297305
version$E: $B\win\version.c
298306
$(BCC) -o$@ $**
299307
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
+
300314
$(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
301315
$(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
302316
303317
$(OBJDIR)\th$O : $(SRCDIR)\th.c
304318
$(TCC) -o$@ -c $**
@@ -461,5 +475,211 @@
461475
}
462476
puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
463477
puts "\t@copy /Y nul: headers"
464478
465479
}
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
+
466686
--- 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
--- 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.
17
# ###########################################################################
28
#
39
# HowTo
410
# -----
511
#
@@ -58,11 +64,11 @@
5864
5965
# define standard C-compiler and flags, used to compile
6066
# the fossil binary. Some special definitions follow for
6167
# special files follow
6268
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]
6470
CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES)
6571
INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR)
6672
6773
# define commands for building the windows resource files
6874
RESOURCE=fossil.res
@@ -79,10 +85,16 @@
7985
SQLITESRC=sqlite3.c
8086
ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
8187
SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
8288
SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
8389
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
+
8496
# define the th scripting files, which need special flags on compile
8597
THSRC=th.c th_lang.c
8698
ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
8799
THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
88100
@@ -92,11 +104,11 @@
92104
ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj))
93105
94106
# define all fossil sources, using the standard compile and
95107
# source generation. These are all files in SRCDIR, which are not
96108
# 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))
98110
SRC=$(subst $(SRCDIR),,$(ORIGSRC))
99111
TRANSLATEDSRC=$(SRC:.c=_.c)
100112
TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
101113
102114
# main target file is the application
@@ -152,10 +164,13 @@
152164
$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
153165
154166
$(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h
155167
$(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@"
156168
169
+$(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c
170
+ $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@"
171
+
157172
$(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h
158173
$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
159174
160175
$(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
161176
$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
@@ -165,12 +180,12 @@
165180
$(RESOURCE): %.res: ../win/%.rc ../win/*.ico
166181
$(RC) $(RCFLAGS) $< -Fo"$@"
167182
168183
# ###########################################################################
169184
# 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)
172187
173188
# ###########################################################################
174189
# cleanup
175190
176191
.PHONY: clean
177192
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button