summaryrefslogtreecommitdiff
path: root/cpu/amd/geode_lx/gplvsa_ii/vsm_lib/makefile
blob: a9c40da1c68f69c637e9122404762245944cab36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#
# Copyright (c) 2006 Advanced Micro Devices,Inc. ("AMD").
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General
# Public License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA 
#
######################################################################
#
#				Init variables
#
######################################################################
!ifndef VSA2ROOT
VSA2ROOT	= ..
!endif

BUILD_DIR	= $(VSA2ROOT)\build
OBJECT		= obj
!include $(BUILD_DIR)\setvars.mak
.SUFFIXES: .asm .h .inc .obj .mac

INCLUDE		= $(OBJECT);$(INCLUDE)

VSMNAME	= vsm_lib


######################################################################
#
#				Build Macros
#
######################################################################

VSMUTILS_ASM_OBJS	= \
	$(OBJECT)\vsa2util.obj \
	$(OBJECT)\pci.obj \
	$(OBJECT)\descr.obj \
	$(OBJECT)\utils.obj \
	$(OBJECT)\misc.obj \
	$(OBJECT)\message.obj \
	$(OBJECT)\virtual.obj \
	$(OBJECT)\irq.obj \
	$(OBJECT)\regs.obj \
	$(OBJECT)\sysinfo.obj \
	$(OBJECT)\sw_int.obj \
	$(OBJECT)\resource.obj \
	$(OBJECT)\critical.obj \
	$(OBJECT)\yield.obj \
	$(OBJECT)\hex.obj \
	$(OBJECT)\present.obj \
	$(OBJECT)\msrs.obj \

#######################################################################
#
#				Targets
#
#######################################################################

all: $(OBJECT) setenv tools.lib
!if !exist ($(BUILD_DIR)\obj)	
	md $(BUILD_DIR)\obj
!endif
	$(COPY) $(OBJECT)\tools.lib $(BUILD_DIR)\obj

tools.lib: $(VSMUTILS_ASM_OBJS)

#This and only this clean target must exist as it is called by cleanall
#cleanall and cleanlocal are defined in rules.mak

clean: cleanlocal
	-@IF EXIST $(BUILD_DIR)\obj\tools.lib $(DEL) $(BUILD_DIR)\obj\tools.lib
	-@IF NOT EXIST $(BUILD_DIR)\obj\*.* rd $(BUILD_DIR)\obj

$(OBJECT):
	-@md $(OBJECT)

#######################################################################
#
#				Dependencies
#
#######################################################################

$(VSMUTILS_ASM_OBJS): $(MAKEDIR)\makefile\
		$(OBJECT)\sysmgr.inc \
		$(OBJECT)\smimac.mac \
		$(OBJECT)\vsa2.inc\
		$(OBJECT)\isa.inc \
		$(OBJECT)\gx2.inc \
		$(OBJECT)\pci.inc \

######################################################################
#
#				Common Targets
#
######################################################################
# include common targets and inference rules
!include $(BUILD_DIR)\rules.mak

######################################################################
#
#				Inference Rules
#
######################################################################
# Override common inference rules here

{$(INC_DIR)}.h{$(OBJECT)}.inc:
	$(H2) /Fa$(OBJECT)\$(@F) /nologo /Zni /C $<

{$(INC_DIR)\$(CPU)}.h{$(OBJECT)}.inc:
	$(H2) /Fa$(OBJECT)\$(@F) /nologo /Zni /C $<

{$(SYSMGR_SRC)}.h{$(OBJECT)}.inc:
	$(H2) /Fa$(OBJECT)\$(@F) /nologo /Zns /C $<

{$(SYSMGR_SRC)\$(CPU)}.h{$(OBJECT)}.inc:
	$(H2) /Fa$(OBJECT)\$(@F) /nologo /Zns /C $<

{$(MAKEDIR)}.asm{$(OBJECT)}.obj:
	$(AS) /nologo $(AS_OPTS) /Fo$@ $< 
	$(LB) $(OBJECT)\tools.lib -+$@;

{$(MAKEDIR)\$(CPU)}.asm{$(OBJECT)}.obj:
	$(AS) /nologo $(AS_OPTS) /Fo$@ $< 
	$(LB) $(OBJECT)\tools.lib -+$@;