1 | # $Id: $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 | # kBuild Sub-Makefile for kLIBC - src/libos2 - The OS/2 import and thunker libraries.
|
---|
5 | #
|
---|
6 | # Copyright (c) 2006 knut st. osmundsen <bird@anduin.net>
|
---|
7 | #
|
---|
8 | #
|
---|
9 | # This file is part of kLIBC.
|
---|
10 | #
|
---|
11 | # kLIBC is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # kLIBC is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with kLIBC; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
24 | #
|
---|
25 | #
|
---|
26 |
|
---|
27 | # include common stuff.
|
---|
28 | DEPTH ?= ../../..
|
---|
29 | SUB_DEPTH = ../..
|
---|
30 | include $(PATH_KBUILD)/subheader.kmk
|
---|
31 | ifeq ($(BUILD_TARGET),os2)
|
---|
32 |
|
---|
33 | #
|
---|
34 | # libos2
|
---|
35 | #
|
---|
36 | LIBRARIES += libos2
|
---|
37 | libos2_TEMPLATE = libc
|
---|
38 | libos2_DEFS = NO_INCL_SAFE_HIMEM_WRAPPERS
|
---|
39 | libos2_SOURCES := \
|
---|
40 | $(wildcard $(PATH_LIBC_SRC)/libos2/safe/*.c) \
|
---|
41 | $(wildcard $(PATH_LIBC_SRC)/libos2/*.imp)
|
---|
42 | ifndef CFG_LIBC_USE_WATCOM
|
---|
43 | libos2_SOURCES += \
|
---|
44 | $(wildcard $(PATH_LIBC_SRC)/libos2/*.c)
|
---|
45 | endif
|
---|
46 |
|
---|
47 |
|
---|
48 | # configure the variants. */
|
---|
49 | $(call LIBC_CONFIG_VARIANT_LIBS_OTHER,libos2)
|
---|
50 |
|
---|
51 | ifndef CFG_LIBC_USE_WATCOM
|
---|
52 | #
|
---|
53 | # Lazy libs.
|
---|
54 | #
|
---|
55 | TEMPLATE_libos2lazy = libos2 lazy import template.
|
---|
56 | TEMPLATE_libos2lazy_EXTENDS = libc
|
---|
57 | TEMPLATE_libos2lazy_TOOL = libos2lazyimp
|
---|
58 | TEMPLATE_libos2lazy_TOOL.os2 = libos2lazyimp
|
---|
59 |
|
---|
60 | TOOL_libos2lazyimp = libos2 ad hoc lazy import tool
|
---|
61 | TOOL_libos2lazyimp_ARLIBSUFF = .a
|
---|
62 | TOOL_libos2lazyimp_LINK_LIBRARY_OUTPUT =
|
---|
63 | TOOL_libos2lazyimp_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
64 | TOOL_libos2lazyimp_LINK_LIBRARY_DEPORD =
|
---|
65 | define TOOL_libos2lazyimp_LINK_LIBRARY_CMDS
|
---|
66 | emximp -l -l -o $(out) $(othersrc)
|
---|
67 | endef
|
---|
68 |
|
---|
69 | LIBRARIES += libos2_unicode_lazy
|
---|
70 | libos2_unicode_lazy_TEMPLATE = libos2lazy
|
---|
71 | libos2_unicode_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/unicode.imp
|
---|
72 |
|
---|
73 | LIBRARIES += libos2_pmwin_lazy
|
---|
74 | libos2_pmwin_lazy_TEMPLATE = libos2lazy
|
---|
75 | libos2_pmwin_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/win.imp
|
---|
76 |
|
---|
77 | LIBRARIES += libos2_pmwp_lazy
|
---|
78 | libos2_pmwp_lazy_TEMPLATE = libos2lazy
|
---|
79 | libos2_pmwp_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/wp.imp
|
---|
80 |
|
---|
81 | LIBRARIES += libos2_pmspl_lazy
|
---|
82 | libos2_pmspl_lazy_TEMPLATE = libos2lazy
|
---|
83 | libos2_pmspl_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/spl.imp
|
---|
84 |
|
---|
85 | LIBRARIES += libos2_som_lazy
|
---|
86 | libos2_som_lazy_TEMPLATE = libos2lazy
|
---|
87 | libos2_som_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/som.imp
|
---|
88 |
|
---|
89 | LIBRARIES += libos2_pmshapi_lazy
|
---|
90 | libos2_pmshapi_lazy_TEMPLATE = libos2lazy
|
---|
91 | libos2_pmshapi_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/shl.imp
|
---|
92 |
|
---|
93 | LIBRARIES += libos2_rexx_lazy
|
---|
94 | libos2_rexx_lazy_TEMPLATE = libos2lazy
|
---|
95 | libos2_rexx_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/rexx.imp
|
---|
96 |
|
---|
97 | LIBRARIES += libos2_rexxapi_lazy
|
---|
98 | libos2_rexxapi_lazy_TEMPLATE = libos2lazy
|
---|
99 | libos2_rexxapi_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/rexxapi.imp
|
---|
100 |
|
---|
101 | LIBRARIES += libos2_pmpic_lazy
|
---|
102 | libos2_pmpic_lazy_TEMPLATE = libos2lazy
|
---|
103 | libos2_pmpic_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/pic.imp
|
---|
104 |
|
---|
105 | LIBRARIES += libos2_helpmgr_lazy
|
---|
106 | libos2_helpmgr_lazy_TEMPLATE = libos2lazy
|
---|
107 | libos2_helpmgr_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/help.imp
|
---|
108 |
|
---|
109 | LIBRARIES += libos2_pmgpi_lazy
|
---|
110 | libos2_pmgpi_lazy_TEMPLATE = libos2lazy
|
---|
111 | libos2_pmgpi_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/gpi.imp
|
---|
112 |
|
---|
113 | LIBRARIES += libos2_pmdrag_lazy
|
---|
114 | libos2_pmdrag_lazy_TEMPLATE = libos2lazy
|
---|
115 | libos2_pmdrag_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/drag.imp
|
---|
116 |
|
---|
117 | LIBRARIES += libos2_pmctls_lazy
|
---|
118 | libos2_pmctls_lazy_TEMPLATE = libos2lazy
|
---|
119 | libos2_pmctls_lazy_SOURCES = $(PATH_LIBC_SRC)/libos2/ctls.imp
|
---|
120 |
|
---|
121 | LIBRARIES += libos2_pm_lazy
|
---|
122 | libos2_pm_lazy_TEMPLATE = libos2lazy
|
---|
123 | libos2_pm_lazy_SOURCES = \
|
---|
124 | $(PATH_LIBC_SRC)/libos2/win.imp \
|
---|
125 | $(PATH_LIBC_SRC)/libos2/wp.imp \
|
---|
126 | $(PATH_LIBC_SRC)/libos2/spl.imp \
|
---|
127 | $(PATH_LIBC_SRC)/libos2/shl.imp \
|
---|
128 | $(PATH_LIBC_SRC)/libos2/pic.imp \
|
---|
129 | $(PATH_LIBC_SRC)/libos2/help.imp \
|
---|
130 | $(PATH_LIBC_SRC)/libos2/gpi.imp \
|
---|
131 | $(PATH_LIBC_SRC)/libos2/drag.imp \
|
---|
132 | $(PATH_LIBC_SRC)/libos2/ctls.imp
|
---|
133 |
|
---|
134 | LIBRARIES += libos2_dos_lazy
|
---|
135 | libos2_dos_lazy_TEMPLATE = libos2lazy
|
---|
136 | libos2_dos_lazy_SOURCES = \
|
---|
137 | $(PATH_LIBC_SRC)/libos2/dos.imp \
|
---|
138 | $(PATH_LIBC_SRC)/libos2/ses.imp \
|
---|
139 | $(PATH_LIBC_SRC)/libos2/que.imp \
|
---|
140 | $(PATH_LIBC_SRC)/libos2/nls.imp \
|
---|
141 | $(PATH_LIBC_SRC)/libos2/msg.imp
|
---|
142 |
|
---|
143 | LIBRARIES += libos2_lazy
|
---|
144 | libos2_lazy_TEMPLATE = libos2lazy
|
---|
145 | libos2_lazy_SOURCES = \
|
---|
146 | $(filter-out %-data.imp,$(wildcard $(PATH_LIBC_SRC)/libos2/*.imp))
|
---|
147 |
|
---|
148 | endif # No lazy libs with watcom, not yet at least.
|
---|
149 | endif # BUILD_TARGET == os2
|
---|
150 | # generate rules
|
---|
151 | include $(PATH_KBUILD)/subfooter.kmk
|
---|
152 |
|
---|