re-worked ndis to do device detection from a win2k-style registry enum database,...
[reactos.git] / freeldr / Makefile
index fa8a21a..ec556f4 100644 (file)
 #  along with this program; if not, write to the Free Software
 #  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #
-       
 
-export CC              = gcc
-export LD              = ld
-export AR              = ar
-export RM              = cmd /C del
-export CP              = cmd /C copy
-export NASM_CMD        = nasm
-export MAKE            = make
+# Windows is default host environment
+ifeq ($(HOST),)
+HOST = mingw32-windows
+endif
 
-.PHONY : bootsect freeldr install clean
+#
+# Choose various options
+#
+ifeq ($(HOST),mingw32-linux)
+RM                     = rm -f
+CP                     = cp -f 
+MKDIR          = mkdir
+SEP      = /
+else
+RM                     = cmd /C del
+CP                     = copy /Y 
+MKDIR          = md
+SEP      = \$(EMPTY_VAR)
+endif
 
-all: bootsect freeldr install
+NASM_CMD       = nasm
+NFLAGS = -fwin32 -dwin32
+BIN2C          = ..$(SEP)tools$(SEP)bin2c
+TOOLSDIR       = ..$(SEP)tools
 
-bootsect:
+all:
+       $(MAKE) -C tools
        $(MAKE) -C bootsect
-
-freeldr: bootsect
        $(MAKE) -C freeldr
-
-install:
        $(MAKE) -C install
+       $(MAKE) -C fdebug
 
 clean:
-       $(RM) *.bin
+       $(MAKE) -C bootsect clean
+       $(MAKE) -C freeldr clean
+       $(MAKE) -C install clean
+       $(MAKE) -C fdebug clean
+       $(MAKE) -C tools clean
+
+.PHONY : clean