| 1 |  | 
|---|
| 2 | # modify, sell and distribute this software is granted provided this | 
|---|
| 3 | # copyright notice appears in all copies. This software is provided | 
|---|
| 4 | # "as is" without express or implied warranty, and with no claim as | 
|---|
| 5 | # to its suitability for any purpose. | 
|---|
| 6 |  | 
|---|
| 7 | # The following #// line will be used by the regression test table generation | 
|---|
| 8 | # program as the column heading for HTML tables. Must not include version number. | 
|---|
| 9 | #//<a href="http://www.comeaucomputing.com/">Comeau<br>C++</a> | 
|---|
| 10 |  | 
|---|
| 11 | # variables used to configure como-tools.jam | 
|---|
| 12 | # | 
|---|
| 13 | # COMO_PATH - path to installation | 
|---|
| 14 | # COMO - name of como executable | 
|---|
| 15 |  | 
|---|
| 16 | COMO_PATH ?= "" ; | 
|---|
| 17 | COMO ?= $(COMO_PATH)/bin/como ; | 
|---|
| 18 |  | 
|---|
| 19 | flags como C++FLAGS <exception-handling>off : --no_exceptions ; | 
|---|
| 20 | flags como C++FLAGS <exception-handling>on : --exceptions ; | 
|---|
| 21 |  | 
|---|
| 22 | flags como CFLAGS <inlining>off : --no_inlining ; | 
|---|
| 23 | flags como CFLAGS <inlining>on <inlining>full : --inlining ; | 
|---|
| 24 |  | 
|---|
| 25 | flags como CFLAGS <optimization>off : -O0 ; | 
|---|
| 26 | flags como CFLAGS <optimization>speed : -O3 ; | 
|---|
| 27 | flags como CFLAGS <optimization>size : -Os ; | 
|---|
| 28 |  | 
|---|
| 29 | flags como CFLAGS <debug-symbols>on : -g ; | 
|---|
| 30 | flags como LINKFLAGS <debug-symbols>on : -g ; | 
|---|
| 31 |  | 
|---|
| 32 | flags como FINDLIBS : m ; | 
|---|
| 33 | flags como FINDLIBS : rt ; | 
|---|
| 34 |  | 
|---|
| 35 | flags como CFLAGS <cflags> ; | 
|---|
| 36 | flags como C++FLAGS <cxxflags> ; | 
|---|
| 37 | flags como DEFINES <define> ; | 
|---|
| 38 | flags como UNDEFS <undef> ; | 
|---|
| 39 | flags como HDRS <include> ; | 
|---|
| 40 | flags como SYSHDRS <sysinclude> ; | 
|---|
| 41 | flags como LINKFLAGS <linkflags> ; | 
|---|
| 42 | flags como ARFLAGS <arflags> ; | 
|---|
| 43 |  | 
|---|
| 44 | flags como LIBPATH <library-path> ; | 
|---|
| 45 | flags como NEEDLIBS <library-file> ; | 
|---|
| 46 | flags como FINDLIBS <find-library> ; | 
|---|
| 47 |  | 
|---|
| 48 | #### Link #### | 
|---|
| 49 |  | 
|---|
| 50 | rule Link-action | 
|---|
| 51 | { | 
|---|
| 52 |     como-Link-action $(<) : $(>) ; | 
|---|
| 53 | } | 
|---|
| 54 |  | 
|---|
| 55 | # for como, we repeat all libraries so that dependencies are always resolved | 
|---|
| 56 | actions como-Link-action bind NEEDLIBS | 
|---|
| 57 | { | 
|---|
| 58 |     $(COMO) $(LINKFLAGS) -o "$(<[1])" "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l"$(FINDLIBS)" | 
|---|
| 59 | } | 
|---|
| 60 |  | 
|---|
| 61 |  | 
|---|
| 62 | #### Cc ##### | 
|---|
| 63 |  | 
|---|
| 64 | rule Cc-action | 
|---|
| 65 | { | 
|---|
| 66 |     como-Cc-action $(<) : $(>) ; | 
|---|
| 67 | } | 
|---|
| 68 |  | 
|---|
| 69 | actions como-Cc-action | 
|---|
| 70 | { | 
|---|
| 71 |     $(COMO) -c --c99 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" | 
|---|
| 72 | } | 
|---|
| 73 |  | 
|---|
| 74 | #### C++ #### | 
|---|
| 75 | rule C++-action | 
|---|
| 76 | { | 
|---|
| 77 |     como-C++-action $(<) : $(>) ; | 
|---|
| 78 | } | 
|---|
| 79 |  | 
|---|
| 80 | actions como-C++-action | 
|---|
| 81 | { | 
|---|
| 82 |     $(COMO) -tused -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)"  -o "$(<)" "$(>)" | 
|---|
| 83 | } | 
|---|
| 84 |  | 
|---|
| 85 | #### Archive #### | 
|---|
| 86 |  | 
|---|
| 87 | rule Archive-action | 
|---|
| 88 | { | 
|---|
| 89 |     como-Archive-action $(<) : $(>) ; | 
|---|
| 90 | } | 
|---|
| 91 |  | 
|---|
| 92 | actions como-Archive-action | 
|---|
| 93 | { | 
|---|
| 94 |     ar rcu $(<) $(>) | 
|---|
| 95 | } | 
|---|
| 96 |  | 
|---|