windoze binary rebuilt with mingw-gcc-4.4
[k8jam.git] / Jamfile
blob74361ecb08de7af850398720da76265147e18688
2 # Jamfile to build Jam (a make(1)-like program)
4 # There are no user-serviceable parts in this file.
6 # Put executables in platform-specific  subdirectory.
7 VERSION = k8jam-2.5.5 ;
10 include Jamrules ;
12 # note that we use the target directory 'bin.unix' to ensure that
13 # 'make install' and 'make uninstall' work correctly
15 if $(UNIX) {
16   if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
17   LOCATE_BIN ?= bin.unix ;
18 } else {
19   if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
20   LOCATE_TARGET ?= bin.$(OSFULL[1]:L) ;
23 # Leave generated source in current directory; it would be nice to use
24 # these lines below to build the source into the platform-specific
25 # directory, but getting scan.c to include the right jambase.h is
26 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
27 # it won't find the bootstrap version.
29 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
30 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
33 # We have some different files for UNIX, VMS, and NT.
37 # For some really stupid reason, classic Jam doesn't define NT
38 # when compiling with Mingw, but the variable MINGW instead..
41 if ! $(NT) && $(MINGW) {
42   NT = 1 ;
43   JAM_TOOLSET = MINGW ;
46 if $(NT) || $(WINE_MINGW) { code = execunix.c filent.c pathunix.c ; }
47 else { code = execunix.c fileunix.c pathunix.c ; }
49 if $(UNIX) && $(OS) = CYGWIN {
50   CCFLAGS += -D__cygwin__ ;
54 # For jam profiling/debugging.
55 if $(PROFILE) {
56   CCFLAGS += -pg ;
57   LINKFLAGS += -pg ;
58   LOCATE_TARGET = $(LOCATE_TARGET)/pg ;
61 if $(DEBUG) {
62   CCFLAGS += -g ;
63   LINKFLAGS += -g ;
64   LOCATE_TARGET = $(LOCATE_TARGET)/g ;
67 # We have to signal jam.h for these
69 if $(OS) = NT {
70   switch $(JAM_TOOLSET) {
71     case MINGW       : CCFLAGS += -DNT ;
72     case LCC         : CCFLAGS += -DNT ;
73     case DIGITALMARS : CCFLAGS += -DNT ;
74     case *           : CCFLAGS += /DNT ;
75   }
79 # Do we know yacc?
80 if $(YACC) { code += jamgram.y ; }
81 else { code += jamgram.c ; }
85 # Build the jamgram.y from the jamgram.yy
86 # yyacc is a slippery script that makes grammars a little
87 # easier to read/maintain.
89 if $(YACC) && $(SUFEXE) = "" {
90   GenFile jamgram.y jamgramtab.h : ./yyacc jamgram.yy ;
95 # How to build the compiled in jambase.
97 Main mkjambase : mkjambase.c ;
101 # The guts of the Jamfile: how to build Jam
103 Main jam : jam.c jambase.c ;
104 LinkLibraries jam : libjam.a ;
105 GenFile jambase.c : mkjambase Jambase ;
108 if $(UNIX) {
109   actions Strip {
110     strip -s $(1)
111   }
113   Strip mkjambase ;
114   Strip jam ;
118 # Strip the Jam executable on Mingw
120 if $(JAM_TOOLSET) = MINGW {
121   actions  Strip {
122     strip $(1)
123   }
124   Strip  jam$(SUFEXE) ;
128 Library libjam.a :
129   builtins.c command.c compile.c $(code) expand.c
130   glob.c hash.c headers.c lists.c make.c make1.c
131   newstr.c option.c parse.c regexp.c rules.c scan.c
132   search.c timestamp.c variable.c
133   hdrmacro.c kstrings.c
135 aliasbreaks =
136   newstr.c
137   rules.c
138   timestamp.c
139   variable.c
140   hdrmacro.c
143 if $(THIS_IS_K8JAM) {
144   ObjectNoAliasing $(aliasbreaks) ;
145 } else {
146   ObjectCcFlags $(aliasbreaks) : -fno-strict-aliasing ;