remove old makefile
[reactos.git] / rosapps / rules.mak
index 48096bc..b8bb641 100644 (file)
@@ -1,30 +1,40 @@
 #
-# Select your host
+# Important
 #
-#HOST = mingw32-linux
-HOST = mingw32-windows
-
+.EXPORT_ALL_VARIABLES:
 
 #
-# Important
+# Select your host
+#HOST = mingw32-windows
+#HOST = mingw32-linux
 #
-.EXPORT_ALL_VARIABLES:
+
+# Windows is default host environment
+ifeq ($(HOST),)
+HOST = mingw32-windows
+endif
+
 
 ifeq ($(HOST),mingw32-linux)
 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
 endif
 
+W32API_PATH = $(PATH_TO_TOP)/../reactos/w32api
+
 #
 # Choose various options
 #
 ifeq ($(HOST),mingw32-linux)
-PREFIX = i586-mingw32-
+PREFIX = mingw32-
 EXE_POSTFIX = 
 CP = cp
 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
-FLOPPY_DIR = A/
+RM = rm
+DOSCLI = no
+FLOPPY_DIR = /mnt/floppy
 # DIST_DIR should be relative from the top of the tree
 DIST_DIR = dist
+SEP = /
 endif
 
 
@@ -38,8 +48,14 @@ DOSCLI = yes
 FLOPPY_DIR = A:
 # DIST_DIR should be relative from the top of the tree
 DIST_DIR = dist
+SEP = \$($EMPTY_VAR)
 endif
 
+# Set INSTALL_DIR to default value if not already set
+# ifeq ($(INSTALL_DIR),)
+INSTALL_DIR = $(PATH_TO_TOP)/reactos
+# endif
+
 #
 # Create variables for all the compiler tools 
 #
@@ -61,6 +77,7 @@ else
 LEAN_AND_MEAN_DEFINE = 
 endif 
 
+CXX = $(PREFIX)g++
 CC = $(PREFIX)gcc
 NATIVE_CC = gcc
 CFLAGS = \
@@ -70,6 +87,7 @@ CFLAGS = \
        -Wall \
        -Wstrict-prototypes \
        -fno-builtin \
+       -I$(W32API_PATH)/include \
        $(LEAN_AND_MEAN_DEFINE) \
        $(DEFINES) \
        $(DEBUGGING_CFLAGS) \
@@ -80,15 +98,16 @@ NM = $(PREFIX)nm
 OBJCOPY = $(PREFIX)objcopy
 STRIP = $(PREFIX)strip
 AS = $(PREFIX)gcc -c -x assembler-with-cpp
-CPP = $(PREFIX)cpp
 AR = $(PREFIX)ar
 RC = $(PREFIX)windres
-RCINC = --include-dir ../reactos/include --include-dir ../../reactos/include --include-dir ../../../reactos/include
+RCINC = --include-dir $(PATH_TO_TOP)/../reactos/include
+TOOLS_PATH = $(PATH_TO_TOP)/../reactos/tools
+RSYM = $(TOOLS_PATH)/rsym
 
 %.o: %.cpp
-       $(CC) $(CFLAGS) -c $< -o $@
+       $(CXX) $(CFLAGS) -c $< -o $@
 %.o: %.cc
-       $(CC) $(CFLAGS) -c $< -o $@
+       $(CXX) $(CFLAGS) -c $< -o $@
 %.o: %.c
        $(CC) $(CFLAGS) -c $< -o $@
 %.o: %.asm