source: trunk/kLdr/Makefile.kmk@ 2854

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

Hacking away on the PE module interpreter.

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# $Id: Makefile.kmk 2854 2006-11-03 03:39:12Z bird $# $Id: Makefile.kmk 2854 2006-11-03 03:39:12Z bird $
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#
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#
65DLLS = kLdr
66kLdr_ASTOOL = NASM
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
72 kLdr_LDFLAGS = -Entry:DllMain@12
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 = .
91kLdr_SOURCES = \
92 kLdr.c \
93 kLdrDyld.c \
94 kLdrDyldFind.c \
95 kLdrDyldMod.c \
96 kLdrDyldOS.c \
97 kLdrHlp.c \
98 kLdrHlpHeap.c \
99 kLdrRdr.c \
100 kLdrRdrFile.c \
101 kLdrMod.c \
102 kLdrModLX.c \
103 kLdrModPE.c
104kLdr_SOURCES.os2 = \
105 kLdr-os2.def \
106 kLdrA-os2.asm
107kLdr_SOURCES.win = \
108 kLdr-win.def \
109 kLdr-win.c
110kLdr_SOURCES.win32 = $(kLdr_SOURCES.win)
111kLdr_SOURCES.win64 = $(kLdr_SOURCES.win)
112
113#
114# The OS/2 stub program.
115#
116PROGRAMS.os2 = kLdrExeStub-os2
117kLdrExeStub-os2_TOOL = GCC3OMF
118kLdrExeStub-os2_ASTOOL = NASM
119kLdrExeStub-os2_ASFLAGS = -f obj
120kLdrExeStub-os2_LDFLAGS = -nostdlib
121kLdrExeStub-os2_LIBS = $(TARGET_kLdr)
122kLdrExeStub-os2_SOURCES = kLdrExeStub-os2.asm
123
124##
125## The (stub) utility.
126##
127#PROGRAMS = kLdrUtil
128
129
130#
131# Heap testcase.
132#
133PROGRAMS += tstkLdrHeap
134tstkLdrHeap_TEMPLATE = TST
135tstkLdrHeap_SOURCES = \
136 tstkLdrHeap.c \
137 kLdrHlp.c \
138 kLdrHlpHeap.c \
139
140
141# generate rules.
142DEPTH = ..
143include $(PATH_KBUILD)/rules.kmk
144
Note: See TracBrowser for help on using the repository browser.