source: trunk/kLdr/Makefile.kmk@ 2858

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

bugfixing - dinner break.

  • Property svn:keywords set to Id
File size: 3.5 KB
RevLine 
[2826]1# $Id: Makefile.kmk 2858 2006-11-06 00:23:14Z bird $# $Id: Makefile.kmk 2858 2006-11-06 00:23:14Z 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
[2858]70 kLdr_CFLAGS = -W3 -Zl -ML
[2825]71 kLdr_ASFLAGS = -f win
[2858]72 kLdr_LDFLAGS = -Entry:DllMain@12 -Debug
[2825]73 kLdr_DEFS = __WIN__
74 kLdr_SDKS = WIN32SDK
75 #kLdr_SDKS.x86 = WIN32SDK
76 #kLdr_SDKS.amd64 = WIN64SDK
[2858]77 kLdr_LIBS = \
78 $$(PATH_TOOL_VCC70_LIB)/LIBC.lib
[2825]79else
80 ifneq ($(filter os2,$(BUILD_TARGET)),)
81 kLdr_TOOL = GCC3OMF
82 kLdr_ASFLAGS = -f obj
83 kLdr_LIBS = os2 gcc end
84 else
85 kLdr_TOOL = GCC3
86 kLdr_ASFLAGS = -f elf
87 kLdr_LIBS = gcc
88 endif
89 kLdr_CFLAGS = -Wall -pedantic
90 kLdr_LDFLAGS = -nostdlib
91endif
92kLdr_INCS = .
[2821]93kLdr_SOURCES = \
94 kLdr.c \
[2836]95 kLdrDyld.c \
96 kLdrDyldFind.c \
[2835]97 kLdrDyldMod.c \
[2846]98 kLdrDyldOS.c \
[2825]99 kLdrHlp.c \
100 kLdrHlpHeap.c \
101 kLdrRdr.c \
102 kLdrRdrFile.c \
[2827]103 kLdrMod.c \
[2854]104 kLdrModLX.c \
105 kLdrModPE.c
[2821]106kLdr_SOURCES.os2 = \
107 kLdr-os2.def \
108 kLdrA-os2.asm
[2833]109kLdr_SOURCES.win = \
110 kLdr-win.def \
111 kLdr-win.c
112kLdr_SOURCES.win32 = $(kLdr_SOURCES.win)
113kLdr_SOURCES.win64 = $(kLdr_SOURCES.win)
[2821]114
115#
116# The OS/2 stub program.
[2825]117#
118PROGRAMS.os2 = kLdrExeStub-os2
[2821]119kLdrExeStub-os2_TOOL = GCC3OMF
120kLdrExeStub-os2_ASTOOL = NASM
121kLdrExeStub-os2_ASFLAGS = -f obj
122kLdrExeStub-os2_LDFLAGS = -nostdlib
123kLdrExeStub-os2_LIBS = $(TARGET_kLdr)
124kLdrExeStub-os2_SOURCES = kLdrExeStub-os2.asm
[2825]125
[2821]126##
127## The (stub) utility.
[2825]128##
[2821]129#PROGRAMS = kLdrUtil
130
[2825]131
132#
133# Heap testcase.
134#
135PROGRAMS += tstkLdrHeap
136tstkLdrHeap_TEMPLATE = TST
137tstkLdrHeap_SOURCES = \
138 tstkLdrHeap.c \
139 kLdrHlp.c \
140 kLdrHlpHeap.c \
141
[2858]142#
143# Heap testcase.
144#
145PROGRAMS += tstkLdrMod
146tstkLdrMod_TEMPLATE = TST
147tstkLdrMod_SOURCES = \
148 tstkLdrMod.c
149ifneq ($(filter win win32 win64 nt,$(BUILD_TARGET)),)
150tstkLdrMod_LIBS = $(TARGET_kLdr:.dll=.lib)
151else
152tstkLdrMod_LIBS = $(TARGET_kLdr)
153endif
[2825]154
[2858]155
156
[2821]157# generate rules.
158DEPTH = ..
159include $(PATH_KBUILD)/rules.kmk
160
Note: See TracBrowser for help on using the repository browser.