got a lot of crypt32 stuff working
[reactos.git] / reactos / Makefile
index f544b22..593fa3a 100644 (file)
@@ -1,3 +1,52 @@
+# Well-known targets:
+#
+#    all (default target)
+#        This target builds all of ReactOS.
+#
+#    module
+#        These targets builds a single module. Replace module with the name of
+#        the module you want to build.
+#
+#    bootcd
+#        This target builds an ISO (ReactOS.iso) from which ReactOS can be booted
+#        and installed.
+#
+#    livecd
+#        This target builds an ISO (ReactOS-Live.iso) from which ReactOS can be
+#        booted, but not installed.
+#
+#    install
+#        This target installs all of ReactOS to a location specified by the
+#        ROS_INSTALL environment variable.
+#
+#    module_install
+#        These targets installs a single module to a location specified by the
+#        ROS_INSTALL environment variable. Replace module with the name of the
+#        module you want to install.
+#
+#    clean
+#        This target cleans (deletes) all files that are generated when building
+#        ReactOS.
+#
+#    module_clean
+#        These targets cleans (deletes) files that are generated when building a
+#        single module. Replace module with the name of the module you want to
+#        clean.
+#
+#    depends
+#        This target does a complete dependency check of the ReactOS codebase.
+#        This can require several minutes to complete. If you only need to check
+#        dependencies for a single or few modules then you can use the
+#        module_depends targets instead. This target can also repair a damaged or
+#        missing makefile.auto if needed.
+#
+#    module_depends
+#        These targets do a dependency check of individual modules. Replace module
+#        with the name of the module for which you want to check dependencies.
+#        This is faster than the depends target which does a complete dependency
+#        check of the ReactOS codebase.
+#
+#
 # Accepted environment variables:
 #
 #    ROS_PREFIX
@@ -66,7 +115,11 @@ all: makefile.auto
 
 ifeq ($(HOST),)
 ifeq ($(word 1,$(shell gcc -dumpmachine)),mingw32)
+ifeq ($(OSTYPE),msys)
+HOST=mingw32-linux
+else
 HOST=mingw32-windows
+endif
 else
 HOST=mingw32-linux
 endif
@@ -120,6 +173,7 @@ ifeq ($(HALFVERBOSEECHO),yes)
   ECHO_MKHIVE  =@echo $(QUOTE)[MKHIVE]   $@$(QUOTE)
   ECHO_REGTESTS=@echo $(QUOTE)[REGTESTS] $@$(QUOTE)
   ECHO_TEST    =@echo $(QUOTE)[TEST]     $@$(QUOTE)
+  ECHO_GENDIB  =@echo $(QUOTE)[GENDIB]   $@$(QUOTE)
 else
   ECHO_CP      =
   ECHO_MKDIR   =
@@ -147,6 +201,7 @@ else
   ECHO_MKHIVE  =
   ECHO_REGTESTS=
   ECHO_TEST    =
+  ECHO_GENDIB  =
 endif
 
 
@@ -156,9 +211,13 @@ host_ld = $(Q)ld
 host_ar = $(Q)ar
 host_objcopy = $(Q)objcopy
 ifeq ($(HOST),mingw32-linux)
-       EXEPREFIX = ./
-       EXEPOSTFIX =
-       SEP = /
+       export EXEPREFIX = ./
+ifeq ($(OSTYPE),msys)
+       export EXEPOSTFIX = .exe
+else   
+       export EXEPOSTFIX =
+endif
+       export SEP = /
        mkdir = -$(Q)mkdir -p
        gcc = $(Q)$(PREFIX)-gcc
        gpp = $(Q)$(PREFIX)-g++
@@ -173,10 +232,29 @@ ifeq ($(HOST),mingw32-linux)
        cp = $(Q)cp
        NUL = /dev/null
 else # mingw32-windows
-       EXEPREFIX =
-       EXEPOSTFIX = .exe
+  ifeq ($(OSTYPE),msys)
+       HOST=mingw32-linux
+       export EXEPREFIX = ./
+       export EXEPOSTFIX = .exe
+       export SEP = /
+       mkdir = -$(Q)mkdir -p
+       gcc = $(Q)gcc
+       gpp = $(Q)g++
+       ld = $(Q)ld
+       nm = $(Q)nm
+       objdump = $(Q)objdump
+       ar = $(Q)ar
+       objcopy = $(Q)objcopy
+       dlltool = $(Q)dlltool
+       windres = $(Q)windres
+       rm = $(Q)rm -f
+       cp = $(Q)cp
+       NUL = /dev/null
+  else
+       export EXEPREFIX =
+       export EXEPOSTFIX = .exe
        ROS_EMPTY =
-       SEP = \$(ROS_EMPTY)
+       export SEP = \$(ROS_EMPTY)
        mkdir = -$(Q)mkdir
        gcc = $(Q)gcc
        gpp = $(Q)g++
@@ -190,6 +268,7 @@ else # mingw32-windows
        rm = $(Q)del /f /q
        cp = $(Q)copy /y
        NUL = NUL
+  endif
 endif
 
 ifneq ($(ROS_INTERMEDIATE),)
@@ -239,21 +318,28 @@ ERRCODES_RC = lib$(SEP)kernel32$(SEP)errcodes.rc
 
 include lib/lib.mak
 include tools/tools.mak
+include boot/freeldr/bootsect/bootsect.mak
 -include makefile.auto
 
 PREAUTO := \
+       $(BIN2C_TARGET) \
        $(BIN2RES_TARGET) \
        $(BUILDNO_H) \
        $(BUGCODES_H) \
        $(BUGCODES_RC) \
        $(ERRCODES_H) \
        $(ERRCODES_RC) \
-       $(NCI_SERVICE_FILES)
+       $(NCI_SERVICE_FILES) \
+       $(GENDIB_DIB_FILES)
 
 makefile.auto: $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES)
        $(ECHO_RBUILD)
        $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) mingw
 
+.PHONY: msvc
+msvc: $(RBUILD_TARGET)
+       $(ECHO_RBUILD)
+       $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) msvc
 
 $(BUGCODES_H) $(BUGCODES_RC): $(WMC_TARGET) $(NTOSKRNL_MC)
        $(ECHO_WMC)
@@ -263,6 +349,26 @@ $(ERRCODES_H) $(ERRCODES_RC): $(WMC_TARGET) $(KERNEL32_MC)
        $(ECHO_WMC)
        $(Q)$(WMC_TARGET) -i -H $(ERRCODES_H) -o $(ERRCODES_RC) $(KERNEL32_MC)
 
+.PHONY: msvc6
+msvc6: $(RBUILD_TARGET)
+       $(ECHO_RBUILD)
+       $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs6.00 msvc
+
+.PHONY: msvc7
+msvc7: $(RBUILD_TARGET)
+       $(ECHO_RBUILD)
+       $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.00 msvc
+
+.PHONY: msvc71
+msvc71: $(RBUILD_TARGET)
+       $(ECHO_RBUILD)
+       $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.10 msvc
+
+.PHONY: msvc8
+msvc8: $(RBUILD_TARGET)
+       $(ECHO_RBUILD)
+       $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs8.00 msvc
+
 .PHONY: makefile_auto_clean
 makefile_auto_clean:
        -@$(rm) makefile.auto $(PREAUTO) 2>$(NUL)