From 6a7adfd71ff3cda64a4496c8d5f087fbbe7c91c7 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 11 May 1999 12:38:45 +0000 Subject: [PATCH] Update for global rules.mak file. svn path=/trunk/; revision=444 --- rosapps/readme.txt | 10 +++++-- rosapps/rules.mak | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 rosapps/rules.mak diff --git a/rosapps/readme.txt b/rosapps/readme.txt index 8f909cf5426..beb7a2e0b84 100644 --- a/rosapps/readme.txt +++ b/rosapps/readme.txt @@ -1,7 +1,11 @@ This directory contains core applications that support the -ReactOS kernel. The following is a short decription of -each. Check the readme.txt under each application for -more detail. +ReactOS kernel. + +Before you start to compile applications check the HOST +variable in 'rules.mak'. + +The following is a short decription of each. Check the +readme.txt under each application for more details. CMD: This is Eric Kohl's port of COMMAND for ReactOS. diff --git a/rosapps/rules.mak b/rosapps/rules.mak new file mode 100644 index 00000000000..9f4e5b45dfb --- /dev/null +++ b/rosapps/rules.mak @@ -0,0 +1,75 @@ +# +# 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 +endif + +ifeq ($(HOST),mingw32-windows) +PREFIX = +EXE_POSTFIX = .exe +CP = copy +DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as +RM = del +DOSCLI = yes +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 +CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-builtin \ + $(LEAN_AND_MEAN_DEFINE) $(DEFINES) $(DEBUGGING_CFLAGS) \ + $(EXTRA_CFLAGS) +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 + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + + +RULES_MAK_INCLUDED = 1 -- 2.17.1