1/****************************************************************************** 2 * 3 * Copyright (C) 1996-2005 Jason Evans <jasone@canonware.com>. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice(s), this list of conditions and the following disclaimer 11 * unmodified other than the allowable addition of one or more 12 * copyright notices. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice(s), this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE 22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 25 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 27 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 28 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * 30 ****************************************************************************** 31 * 32 * Version: Onyx 5.1.2 33 * 34 * Top level Cookfile for libraries. 35 * 36 ******************************************************************************/ 37 38#include-cooked [fromto % @objroot@/lib/%/Cookfile.inc @libs@] 39 40/* 41 * Targets. 42 */ 43libs_a : [addsuffix _libs_a @libs@]; 44libs_s : [addsuffix _libs_s @libs@]; 45libs : libs_a libs_s; 46 47libs_tests : [addsuffix _libs_tests @libs@]; 48libs_check : [addsuffix _libs_check @libs@]; 49libs_check_update : [addsuffix _libs_check_update @libs@]; 50 51libs_bootstrap : [addsuffix _libs_bootstrap @libs@]; 52 53libs_install_i : [addsuffix _libs_install_i @libs@]; 54libs_install_a : [addsuffix _libs_install_a @libs@]; 55libs_install_s : [addsuffix _libs_install_s @libs@]; 56libs_install : libs_install_i libs_install_a libs_install_s; 57 58libs_uninstall : [addsuffix _libs_uninstall @libs@]; 59 60libs_clean : [addsuffix _libs_clean @libs@]; 61libs_distclean : [addsuffix _libs_distclean @libs@]; 62 63/* 64 * Build rules for library C files --> object files. 65 */ 66@objroot@/lib/%0src/%1.o_a : @srcroot@/lib/%0src/%1.c 67 set mkdir 68{ 69 [TCC] [A_CFLAGS] [CPPFLAGS] -c @srcroot@/lib/%0src/%1.c 70 -o [target]; 71 72 c_incl [filter_cppdefs [CPPFLAGS]] --no-cache -Absent_Local_Ignore -No_System 73 @srcroot@/lib/%0src/%1.c 74 "--prefix='"[target]" : "@srcroot@/lib/%0src/%1.c"'" 75 "--suffix='set nodefault;'" 76 -o [fromto lib/%0src/%1.o_a lib/%0src/%1.d_a [target]]; 77} 78 79@objroot@/lib/%0src/%1.o_b : @srcroot@/lib/%0src/%1.c 80 set mkdir 81{ 82 [HCC] [A_CFLAGS] [CPPFLAGS] -c @srcroot@/lib/%0src/%1.c 83 -o [target]; 84 85 c_incl [filter_cppdefs [CPPFLAGS]] --no-cache -Absent_Local_Ignore -No_System 86 @srcroot@/lib/%0src/%1.c 87 "--prefix='"[target]" : "@srcroot@/lib/%0src/%1.c"'" 88 "--suffix='set nodefault;'" 89 -o [fromto lib/%0src/%1.o_b lib/%0src/%1.d_b [target]]; 90} 91 92@objroot@/lib/%0src/%1.o_s : @srcroot@/lib/%0src/%1.c 93 set mkdir 94{ 95 [TCC] [S_CFLAGS] [CPPFLAGS] -c @srcroot@/lib/%0src/%1.c 96 -o [target]; 97 98 c_incl [filter_cppdefs [CPPFLAGS]] --no-cache -Absent_Local_Ignore -No_System 99 @srcroot@/lib/%0src/%1.c 100 "--prefix='"[target]" : "@srcroot@/lib/%0src/%1.c"'" 101 "--suffix='set nodefault;'" 102 -o [fromto lib/%0src/%1.o_s lib/%0src/%1.d_s [target]]; 103} 104 105/* For generated C files. */ 106@objroot@/lib/%0src/%1.o_a : @objroot@/lib/%0src/%1.c 107 set mkdir 108{ 109 [TCC] [A_CFLAGS] [CPPFLAGS] -c @objroot@/lib/%0src/%1.c 110 -o [target]; 111 112 c_incl [filter_cppdefs [CPPFLAGS]] --no-cache -Absent_Local_Ignore -No_System 113 @objroot@/lib/%0src/%1.c 114 "--prefix='"[target]" : "@objroot@/lib/%0src/%1.c"'" 115 "--suffix='set nodefault;'" 116 -o [fromto lib/%0src/%1.o_a lib/%0src/%1.d_a [target]]; 117} 118 119@objroot@/lib/%0src/%1.o_b : @objroot@/lib/%0src/%1.c 120 set mkdir 121{ 122 [HCC] [A_CFLAGS] [CPPFLAGS] -c @objroot@/lib/%0src/%1.c 123 -o [target]; 124 125 c_incl [filter_cppdefs [CPPFLAGS]] --no-cache -Absent_Local_Ignore -No_System 126 @objroot@/lib/%0src/%1.c 127 "--prefix='"[target]" : "@objroot@/lib/%0src/%1.c"'" 128 "--suffix='set nodefault;'" 129 -o [fromto lib/%0src/%1.o_b lib/%0src/%1.d_b [target]]; 130} 131 132@objroot@/lib/%0src/%1.o_s : @objroot@/lib/%0src/%1.c 133 set mkdir 134{ 135 [TCC] [S_CFLAGS] [CPPFLAGS] -c @objroot@/lib/%0src/%1.c 136 -o [target]; 137 138 c_incl [filter_cppdefs [CPPFLAGS]] --no-cache -Absent_Local_Ignore -No_System 139 @objroot@/lib/%0src/%1.c 140 "--prefix='"[target]" : "@objroot@/lib/%0src/%1.c"'" 141 "--suffix='set nodefault;'" 142 -o [fromto lib/%0src/%1.o_s lib/%0src/%1.d_s [target]]; 143} 144