1999-05-11 12:38:45 +00:00
|
|
|
#
|
2002-08-17 16:06:29 +00:00
|
|
|
# Important
|
1999-05-11 12:38:45 +00:00
|
|
|
#
|
2002-08-17 16:06:29 +00:00
|
|
|
.EXPORT_ALL_VARIABLES:
|
1999-05-11 12:38:45 +00:00
|
|
|
|
|
|
|
#
|
2002-08-17 16:06:29 +00:00
|
|
|
# Select your host
|
|
|
|
#HOST = mingw32-windows
|
|
|
|
#HOST = mingw32-linux
|
1999-05-11 12:38:45 +00:00
|
|
|
#
|
2002-09-03 18:44:19 +00:00
|
|
|
|
2002-08-17 16:06:29 +00:00
|
|
|
# Windows is default host environment
|
|
|
|
ifeq ($(HOST),)
|
|
|
|
HOST = mingw32-windows
|
|
|
|
endif
|
|
|
|
|
1999-05-11 12:38:45 +00:00
|
|
|
|
|
|
|
ifeq ($(HOST),mingw32-linux)
|
|
|
|
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Choose various options
|
|
|
|
#
|
|
|
|
ifeq ($(HOST),mingw32-linux)
|
2002-09-03 18:44:19 +00:00
|
|
|
PREFIX = mingw32-
|
1999-05-11 12:38:45 +00:00
|
|
|
EXE_POSTFIX =
|
|
|
|
CP = cp
|
|
|
|
DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
|
2002-09-03 18:44:19 +00:00
|
|
|
RM = rm
|
|
|
|
DOSCLI = no
|
|
|
|
FLOPPY_DIR = /mnt/floppy
|
1999-09-12 18:18:09 +00:00
|
|
|
# DIST_DIR should be relative from the top of the tree
|
|
|
|
DIST_DIR = dist
|
2002-09-03 18:44:19 +00:00
|
|
|
SEP = /
|
1999-05-11 12:38:45 +00:00
|
|
|
endif
|
|
|
|
|
2000-02-29 23:57:47 +00:00
|
|
|
|
1999-05-11 12:38:45 +00:00
|
|
|
ifeq ($(HOST),mingw32-windows)
|
|
|
|
PREFIX =
|
|
|
|
EXE_POSTFIX = .exe
|
|
|
|
CP = copy
|
|
|
|
DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
|
|
|
|
RM = del
|
|
|
|
DOSCLI = yes
|
1999-09-12 18:18:09 +00:00
|
|
|
FLOPPY_DIR = A:
|
|
|
|
# DIST_DIR should be relative from the top of the tree
|
|
|
|
DIST_DIR = dist
|
2002-09-03 18:44:19 +00:00
|
|
|
SEP = \$($EMPTY_VAR)
|
1999-05-11 12:38:45 +00:00
|
|
|
endif
|
|
|
|
|
2003-01-15 19:55:29 +00:00
|
|
|
# Set INSTALL_DIR to default value if not already set
|
|
|
|
# ifeq ($(INSTALL_DIR),)
|
|
|
|
INSTALL_DIR = $(PATH_TO_TOP)/reactos
|
|
|
|
# endif
|
|
|
|
|
1999-05-11 12:38:45 +00:00
|
|
|
#
|
|
|
|
# Create variables for all the compiler tools
|
|
|
|
#
|
|
|
|
ifeq ($(WITH_DEBUGGING),yes)
|
|
|
|
DEBUGGING_CFLAGS = -g
|
|
|
|
else
|
|
|
|
DEBUGGING_CFLAGS =
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(WARNINGS_ARE_ERRORS),yes)
|
|
|
|
EXTRA_CFLAGS = -Werror
|
|
|
|
endif
|
|
|
|
|
|
|
|
DEFINES = -DDBG
|
|
|
|
|
|
|
|
ifeq ($(WIN32_LEAN_AND_MEAN),yes)
|
|
|
|
LEAN_AND_MEAN_DEFINE = -DWIN32_LEAN_AND_MEAN
|
|
|
|
else
|
|
|
|
LEAN_AND_MEAN_DEFINE =
|
|
|
|
endif
|
|
|
|
|
2003-08-11 18:17:44 +00:00
|
|
|
CXX = $(PREFIX)g++
|
1999-05-11 12:38:45 +00:00
|
|
|
CC = $(PREFIX)gcc
|
|
|
|
NATIVE_CC = gcc
|
2000-02-29 23:57:47 +00:00
|
|
|
CFLAGS = \
|
2000-04-25 23:22:57 +00:00
|
|
|
$(BASE_CFLAGS) \
|
2000-02-29 23:57:47 +00:00
|
|
|
-pipe \
|
|
|
|
-O2 \
|
|
|
|
-Wall \
|
|
|
|
-Wstrict-prototypes \
|
|
|
|
-fno-builtin \
|
|
|
|
$(LEAN_AND_MEAN_DEFINE) \
|
|
|
|
$(DEFINES) \
|
|
|
|
$(DEBUGGING_CFLAGS) \
|
|
|
|
$(EXTRA_CFLAGS)
|
1999-05-11 12:38:45 +00:00
|
|
|
CXXFLAGS = $(CFLAGS)
|
|
|
|
LD = $(PREFIX)ld
|
|
|
|
NM = $(PREFIX)nm
|
|
|
|
OBJCOPY = $(PREFIX)objcopy
|
|
|
|
STRIP = $(PREFIX)strip
|
|
|
|
AS = $(PREFIX)gcc -c -x assembler-with-cpp
|
|
|
|
AR = $(PREFIX)ar
|
1999-05-15 07:23:34 +00:00
|
|
|
RC = $(PREFIX)windres
|
2002-09-03 18:44:19 +00:00
|
|
|
RCINC = --include-dir $(PATH_TO_TOP)/../reactos/include
|
2002-08-17 16:06:29 +00:00
|
|
|
TOOLS_PATH = $(PATH_TO_TOP)/../reactos/tools
|
|
|
|
RSYM = $(TOOLS_PATH)/rsym
|
|
|
|
|
2001-11-20 21:56:54 +00:00
|
|
|
%.o: %.cpp
|
2003-08-11 18:17:44 +00:00
|
|
|
$(CXX) $(CFLAGS) -c $< -o $@
|
2000-02-29 23:57:47 +00:00
|
|
|
%.o: %.cc
|
2003-08-11 18:17:44 +00:00
|
|
|
$(CXX) $(CFLAGS) -c $< -o $@
|
1999-05-11 12:38:45 +00:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2000-02-29 23:57:47 +00:00
|
|
|
%.o: %.asm
|
|
|
|
$(NASM_CMD) $(NFLAGS) $< -o $@
|
1999-09-12 18:18:09 +00:00
|
|
|
%.coff: %.rc
|
2002-06-29 18:21:00 +00:00
|
|
|
$(RC) $(RCFLAGS) $(RCINC) $< $@
|
2000-02-29 23:57:47 +00:00
|
|
|
|
1999-05-11 12:38:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
RULES_MAK_INCLUDED = 1
|