source: trunk/kLdr/Makefile.kmk@ 2844

Last change on this file since 2844 was 2836, checked in by bird, 19 years ago

more prototyping. (And avoid 64-bit div/rem)

  • Property svn:keywords set to Id
File size: 3.2 KB
RevLine 
[2826]1# $Id: Makefile.kmk 2836 2006-10-26 03:58:53Z bird $# $Id: Makefile.kmk 2836 2006-10-26 03:58:53Z bird $
[2821]2## @file
3#
4# kBuild Makefile for the kLdr.
5#
6# Copyright (c) 2006 knut st. osmundsen <bird@anduin.net>
7#
8#
9# This file is part of kLdr.
10#
11# kLdr 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# kLdr 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 kLdr; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24#
25#
26
27
28#
[2825]29# Template for testcases.
30#
31TEMPLATE_TST = Testcase template
32ifneq ($(filter win nt win32 win64,$(BUILD_TARGET)),)
33 TEMPLATE_TST_TOOL = VCC70
34 TEMPLATE_TST_CFLAGS = -W3 -Zi -Zl -MD
35 TEMPLATE_TST_CFLAGS.release = -O2
36 TEMPLATE_TST_ASFLAGS = -f win
37 TEMPLATE_TST_DEFS = __WIN__
38 TEMPLATE_TST_SDKS = WIN32SDK
39 #kLdr_SDKS.x86 = WIN32SDK
40 #kLdr_SDKS.amd64 = WIN64SDK
41
42## @todo this is a kBuild bug!
43 TEMPLATE_TST_LIBS = \
44 $$(PATH_TOOL_VCC70_LIB)/msvcrt.lib
45else
46 ifneq ($(filter os2,$(BUILD_TARGET)),)
47 TEMPLATE_TST_TOOL = GCC3OMF
48 TEMPLATE_TST_ASFLAGS = -f obj
49 TEMPLATE_TST_LIBS = os2 gcc end
50 else
51 TEMPLATE_TST_TOOL = GCC3
52 TEMPLATE_TST_ASFLAGS = -f elf
53 TEMPLATE_TST_LIBS = gcc
54 endif
55 TEMPLATE_TST_CFLAGS = -Wall -pedantic -g
56 TEMPLATE_TST_CFLAGS.release = -O2
57 TEMPLATE_TST_LDFLAGS =
58endif
59TEMPLATE_TST_INCS = .
60
61
62#
63# The kLdr DLL.
64#
[2821]65DLLS = kLdr
66kLdr_ASTOOL = NASM
[2825]67ifneq ($(filter win nt win32 win64,$(BUILD_TARGET)),)
68 kLdr_TOOL = GCC3
69 kLdr_TOOL = VCC70
70 kLdr_CFLAGS = -W3 -Zl
71 kLdr_ASFLAGS = -f win
[2833]72 kLdr_LDFLAGS = -Entry:DllMain@12
[2825]73 kLdr_DEFS = __WIN__
74 kLdr_SDKS = WIN32SDK
75 #kLdr_SDKS.x86 = WIN32SDK
76 #kLdr_SDKS.amd64 = WIN64SDK
77else
78 ifneq ($(filter os2,$(BUILD_TARGET)),)
79 kLdr_TOOL = GCC3OMF
80 kLdr_ASFLAGS = -f obj
81 kLdr_LIBS = os2 gcc end
82 else
83 kLdr_TOOL = GCC3
84 kLdr_ASFLAGS = -f elf
85 kLdr_LIBS = gcc
86 endif
87 kLdr_CFLAGS = -Wall -pedantic
88 kLdr_LDFLAGS = -nostdlib
89endif
90kLdr_INCS = .
[2821]91kLdr_SOURCES = \
92 kLdr.c \
[2836]93 kLdrDyld.c \
94 kLdrDyldFind.c \
[2835]95 kLdrDyldMod.c \
[2825]96 kLdrHlp.c \
97 kLdrHlpHeap.c \
98 kLdrRdr.c \
99 kLdrRdrFile.c \
[2827]100 kLdrMod.c \
101 kLdrModLX.c
[2821]102kLdr_SOURCES.os2 = \
103 kLdr-os2.def \
104 kLdrA-os2.asm
[2833]105kLdr_SOURCES.win = \
106 kLdr-win.def \
107 kLdr-win.c
108kLdr_SOURCES.win32 = $(kLdr_SOURCES.win)
109kLdr_SOURCES.win64 = $(kLdr_SOURCES.win)
[2821]110
111#
112# The OS/2 stub program.
[2825]113#
114PROGRAMS.os2 = kLdrExeStub-os2
[2821]115kLdrExeStub-os2_TOOL = GCC3OMF
116kLdrExeStub-os2_ASTOOL = NASM
117kLdrExeStub-os2_ASFLAGS = -f obj
118kLdrExeStub-os2_LDFLAGS = -nostdlib
119kLdrExeStub-os2_LIBS = $(TARGET_kLdr)
120kLdrExeStub-os2_SOURCES = kLdrExeStub-os2.asm
[2825]121
[2821]122##
123## The (stub) utility.
[2825]124##
[2821]125#PROGRAMS = kLdrUtil
126
[2825]127
128#
129# Heap testcase.
130#
131PROGRAMS += tstkLdrHeap
132tstkLdrHeap_TEMPLATE = TST
133tstkLdrHeap_SOURCES = \
134 tstkLdrHeap.c \
135 kLdrHlp.c \
136 kLdrHlpHeap.c \
137
138
[2821]139# generate rules.
140DEPTH = ..
141include $(PATH_KBUILD)/rules.kmk
142
Note: See TracBrowser for help on using the repository browser.