1999-05-11 12:38:45 +00:00
|
|
|
#
|
|
|
|
# Select your host
|
|
|
|
#
|
|
|
|
#HOST = mingw32-linux
|
|
|
|
HOST = mingw32-windows
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Important
|
|
|
|
#
|
|
|
|
.EXPORT_ALL_VARIABLES:
|
|
|
|
|
|
|
|
ifeq ($(HOST),mingw32-linux)
|
|
|
|
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Choose various options
|
|
|
|
#
|
|
|
|
ifeq ($(HOST),mingw32-linux)
|
|
|
|
PREFIX = i586-mingw32-
|
|
|
|
EXE_POSTFIX =
|
|
|
|
CP = cp
|
|
|
|
DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
|
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
|
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
|
1999-05-11 12:38:45 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
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
|
|
|
|
CPP = $(PREFIX)cpp
|
|
|
|
AR = $(PREFIX)ar
|
1999-05-15 07:23:34 +00:00
|
|
|
RC = $(PREFIX)windres
|
2000-02-29 23:57:47 +00:00
|
|
|
RCINC = --include-dir ../reactos/include --include-dir ../../reactos/include --include-dir ../../../reactos/include
|
1999-05-11 12:38:45 +00:00
|
|
|
|
2001-11-20 21:56:54 +00:00
|
|
|
%.o: %.cpp
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2000-02-29 23:57:47 +00:00
|
|
|
%.o: %.cc
|
|
|
|
$(CC) $(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
|
2000-02-29 23:57:47 +00:00
|
|
|
$(RC) $(RCINC) $< $@
|
|
|
|
|
1999-05-11 12:38:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
RULES_MAK_INCLUDED = 1
|