6 ifeq ($(HOST
),mingw32-linux
)
7 TOPDIR
:= $(shell if
[ "$$PWD" != "" ]; then echo
$$PWD; else pwd
; fi
)
11 # Choose various options
13 ifeq ($(HOST
),mingw32-linux
)
15 PREFIX
= i586-mingw32-
19 CP
= $(PATH_TO_TOP
)/rcopy
20 DLLTOOL
= $(PREFIX
)dlltool
--as=$(PREFIX
)as
22 KM_SPECS
= $(TOPDIR
)/specs
24 # DIST_DIR should be relative from the top of the tree
28 ifeq ($(HOST
),mingw32-windows
)
34 DLLTOOL
= $(PREFIX
)dlltool
--as=$(PREFIX
)as
41 # DIST_DIR should be relative from the top of the tree
46 # Create variables for all the compiler tools
48 ifeq ($(WITH_DEBUGGING
),yes
)
56 ifeq ($(WARNINGS_ARE_ERRORS
),yes
)
57 EXTRA_CFLAGS
= -Werror
62 ifeq ($(WIN32_LEAN_AND_MEAN
),yes
)
63 LEAN_AND_MEAN_DEFINE
= -DWIN32_LEAN_AND_MEAN
65 LEAN_AND_MEAN_DEFINE
=
71 CFLAGS
= $(BASE_CFLAGS
) \
74 $(LEAN_AND_MEAN_DEFINE
) \
76 -Wstrict-prototypes
$(DEBUGGING_CFLAGS
) \
79 NFLAGS
= -i..
/..
/include/ -i..
/include/ -pinternal
/asm.inc
-f
$(NASM_FORMAT
) -d
$(NASM_FORMAT
)
82 OBJCOPY
= $(PREFIX
)objcopy
83 STRIP
= $(PREFIX
)strip
84 AS_INCLUDES
= -I..
/include
85 AS
= $(PREFIX
)gcc
-c
-x assembler-with-cpp
-D__ASM__
$(AS_BASEFLAGS
) $(AS_INCLUDES
)
89 RCINC
= --include-dir ..
/include --include-dir ..
/..
/include --include-dir ..
/..
/..
/include
92 $(CC
) $(CFLAGS
) -c
$< -o
$@
94 $(CC
) $(CFLAGS
) -c
$< -o
$@
96 $(NASM_CMD
) $(NFLAGS
) $< -o
$@
102 -specs
=$(PATH_TO_TOP
)/services
/svc_specs \
105 -Wl
,--defsym
,_end
=end \
106 -Wl
,--defsym
,_edata
=__data_end__ \
107 -Wl
,--defsym
,_etext
=etext \
108 -Wl
,--base-file
,base.tmp
$^
112 --base-file base.tmp \
113 --output-exp temp.exp \
118 -Wl
,--image-base
,0x10000 \
119 -Wl
,-e
,_DriverEntry@
8 \
121 -specs
=$(PATH_TO_TOP
)/services
/svc_specs \
126 $(STRIP
) --strip-debug
$<
128 -specs
=$(PATH_TO_TOP
)/services
/svc_specs \
131 -Wl
,--defsym
,_end
=end \
132 -Wl
,--defsym
,_edata
=__data_end__ \
133 -Wl
,--defsym
,_etext
=etext \
134 -Wl
,--base-file
,base.tmp
$^
138 --base-file base.tmp \
139 --output-exp temp.exp \
144 -Wl
,--image-base
,0x10000 \
145 -Wl
,-e
,_DriverEntry@
8 \
147 -specs
=$(PATH_TO_TOP
)/services
/svc_specs \
153 RULES_MAK_INCLUDED
= 1