NtOpenThreadToken() opens the thread token if OpenAsSelf is FALSE.
[reactos.git] / reactos / Makefile
index e2c1579..3747754 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.188 2003/12/07 01:12:58 weiden Exp $
+# $Id: Makefile,v 1.235 2004/07/10 21:44:14 sedwards Exp $
 #
 # Global makefile
 #
@@ -32,19 +32,23 @@ BUS = acpi isapnp pci
 LIB_FSLIB = vfatlib
 
 # Static libraries
-LIB_STATIC = string rosrtl epsapi zlib
+LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh
 
 # Keyboard layout libraries
-DLLS_KBD = kbdus kbdgr kbdfr
+DLLS_KBD = kbddv kbdfr kbdgr kbdse kbduk kbdus
+
+# Control Panels
+DLLS_CPL = cpl
 
 # User mode libraries
-# advapi32 cards crtdll fmifs gdi32 imagehlp kernel32 libpcap packet msafd msvcrt ntdll
+# advapi32 cards crtdll comdlg32 fmifs gdi32 imagehlp kernel32 libpcap packet msafd msvcrt ntdll
 # epsapi psapi richedit rpcrt4 secur32 user32 version ws2help ws2_32 wsock32 wshirda mswsock
-# imagehlp
-DLLS = libwine advapi32 cards crtdll fmifs freetype gdi32 kernel32 packet lzexpand \
-       msafd msvcrt ntdll psapi richedit rpcrt4 secur32 syssetup twain user32 version \
-       winspool ws2help ws2_32 wsock32 wshirda iphlpapi msgina mswsock msimg32 d3d8thk \
-       winmm ole32 comctl32 $(DLLS_KBD)
+# imagehlp imm32
+DLLS = acledit advapi32 cabinet cards comctl32 crtdll comdlg32 d3d8thk expat fmifs freetype gdi32 \
+       imm32 iphlpapi kernel32 lzexpand mpr msafd msgina msimg32 msvcrt msvcrt20 msvideo mswsock \
+       netapi32 ntdll ole32 oleaut32 oledlg packet psapi richedit rpcrt4 samlib secur32 \
+       setupapi shell32 shlwapi snmpapi syssetup twain unicode user32 userenv version wininet \
+       winmm winspool ws2help ws2_32 wsock32 wshirda imagehlp $(DLLS_KBD) $(DLLS_CPL)
 
 SUBSYS = smss win32k csrss ntvdm
 
@@ -59,13 +63,13 @@ SERVERS = win32
 LOADERS = dos
 
 # Driver support libraries
-#bzip2 zlib
-DRIVERS_LIB = bzip2
+#bzip2 zlib oskittcp
+DRIVERS_LIB = bzip2 oskittcp csq
 
 # Kernel mode device drivers
 # Obsolete: ide
-# beep blue floppy null parallel ramdrv serenum serial vga videoprt
-DEVICE_DRIVERS = beep blue debugout floppy null serial vga videoprt bootvid
+# beep blue floppy null parallel ramdrv serenum serial
+DEVICE_DRIVERS = beep blue debugout null serial bootvid
 
 # Kernel mode input drivers
 INPUT_DRIVERS = keyboard mouclass psaux sermouse
@@ -84,11 +88,11 @@ NET_DEVICE_DRIVERS = ne2000 pcnet
 
 # Kernel mode storage drivers
 # atapi cdrom class2 disk scsiport
-STORAGE_DRIVERS = atapi cdrom class2 disk scsiport diskdump
+STORAGE_DRIVERS = atapi cdrom class2 disk floppy scsiport diskdump
 
 # System applications
 # autochk cmd format services setup usetup welcome winlogon
-SYS_APPS = autochk cmd format services setup usetup welcome winlogon userinit
+SYS_APPS = autochk cmd explorer expand format services setup taskmgr userinit usetup welcome vmwinst winlogon regedit
 
 # System services
 # rpcss eventlog
@@ -97,9 +101,9 @@ SYS_SVC = rpcss eventlog
 APPS = tests testsets utils
 
 
-# External (sub)systems for ReactOS
-# rosapps wine posix os2 (requires c++) java (non-existant)
-EXTERNALS = rosapps wine posix os2
+# External modules and (sub)systems for ReactOS
+# rosapps posix os2 (requires c++) java (non-existant)
+EXTERNALS = rosapps
 
 ifeq ($(ROS_BUILD_EXT),yes)
 EXT_MODULES = $(EXTERNALS)
@@ -108,14 +112,14 @@ EXT_MODULES =
 endif
 
 KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
-       $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS)
+       $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS) VIDEO_DRIVERS
 
 # Regression tests
 REGTESTS = regtests
 
-all: tools dk implib $(LIB_STATIC) $(COMPONENTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
+all: tools dk implib $(LIB_STATIC) $(COMPONENTS) $(REGTESTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
      $(LOADERS) $(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) \
-     $(APPS) $(EXT_MODULES) $(REGTESTS)
+     $(APPS) $(EXT_MODULES)
 
 #config: $(TOOLS:%=%_config)
 
@@ -125,8 +129,7 @@ depends: $(LIB_STATIC:%=%_depends) $(LIB_FSLIB:%=%_depends) $(DLLS:%=%_depends)
 implib: $(COMPONENTS:%=%_implib) $(HALS:%=%_implib) $(BUS:%=%_implib) \
        $(LIB_STATIC:%=%_implib) $(LIB_FSLIB:%=%_implib) $(DLLS:%=%_implib) $(LOADERS:%=%_implib) \
        $(KERNEL_DRIVERS:%=%_implib) $(SUBSYS:%=%_implib) \
-       $(SYS_APPS:%=%_implib) $(SYS_SVC:%=%_implib) \
-       $(APPS:%=%_implib) $(EXT_MODULES:%=%_implib)
+       $(SYS_SVC:%=%_implib) $(EXT_MODULES:%=%_implib)
 
 clean: tools dk_clean $(HALS:%=%_clean) \
        $(COMPONENTS:%=%_clean) $(BUS:%=%_clean) $(LIB_STATIC:%=%_clean) $(LIB_FSLIB:%=%_clean) $(DLLS:%=%_clean) \
@@ -139,13 +142,13 @@ clean: tools dk_clean $(HALS:%=%_clean) \
 clean_after:
        $(RM) $(PATH_TO_TOP)/include/roscfg.h
 
-install: tools install_dirs install_before \
+fastinstall: tools install_dirs install_before \
          $(COMPONENTS:%=%_install) $(HALS:%=%_install) $(BUS:%=%_install) \
          $(LIB_STATIC:%=%_install) $(LIB_FSLIB:%=%_install) $(DLLS:%=%_install) $(LOADERS:%=%_install) \
          $(KERNEL_DRIVERS:%=%_install) $(SUBSYS:%=%_install) \
          $(SYS_APPS:%=%_install) $(SYS_SVC:%=%_install) \
-         $(APPS:%=%_install) $(EXT_MODULES:%=%_install) $(REGTESTS:%=%_install) \
-         registry
+         $(APPS:%=%_install) $(EXT_MODULES:%=%_install) $(REGTESTS:%=%_install)
+install: fastinstall registry
 
 FREELDR_DIR = ../freeldr
 
@@ -180,9 +183,11 @@ bootcd_install_before:
        $(RLINE) bootdata/hivesys.inf $(BOOTCD_DIR)/reactos/hivesys.inf
        $(RLINE) bootdata/txtsetup.sif $(BOOTCD_DIR)/reactos/txtsetup.sif
        $(CP) bootdata/icon.ico $(BOOTCD_DIR)/icon.ico
+       $(CP) subsys/system/welcome/welcome.exe $(BOOTCD_DIR)/reactos/welcome.exe
        $(CP) media/nls/c_1252.nls $(BOOTCD_DIR)/reactos/c_1252.nls
        $(CP) media/nls/c_437.nls $(BOOTCD_DIR)/reactos/c_437.nls
        $(CP) media/nls/l_intl.nls $(BOOTCD_DIR)/reactos/l_intl.nls
+       $(CP) media/drivers/etc/services $(BOOTCD_DIR)/reactos/services
 
 bootcd_basic: bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
 
@@ -195,12 +200,36 @@ bootcd_makecd:
 ubootcd_unattend:
        $(CP) bootdata/unattend.inf $(BOOTCD_DIR)/reactos/unattend.inf
 
+livecd_directory_layout:
+       $(RMKDIR) $(LIVECD_DIR)
+       $(RMKDIR) $(LIVECD_DIR)/loader
+       $(RMKDIR) $(LIVECD_DIR)/reactos
+       $(RMKDIR) $(LIVECD_DIR)/Profiles/All\ Users/Desktop
+       $(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/Desktop
+       $(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/My\ Documents
+       $(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${LIVECD_DIR}/../isoboot.bin
+       $(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${LIVECD_DIR}/loader/setupldr.sys
+       $(RLINE) bootdata/livecd.ini $(LIVECD_DIR)/freeldr.ini
+
+livecd_bootstrap_files:
+       $(MAKE) LIVECD_INSTALL=yes fastinstall
+
+livecd_install_before:
+       $(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(LIVECD_DIR)/reactos/system32/config bootdata/livecd.inf bootdata/hiveinst.inf
+
+livecd_basic: livecd_directory_layout livecd_bootstrap_files livecd_install_before
+
+livecd_makecd:
+       $(TOOLS_PATH)/cdmake/cdmake -m -j -b $(LIVECD_DIR)/../isoboot.bin $(LIVECD_DIR) REACTOS roslive.iso
+
 bootcd: bootcd_basic bootcd_makecd
 
 ubootcd: bootcd_basic ubootcd_unattend bootcd_makecd
 
+livecd: livecd_basic livecd_makecd
+
 registry: tools
-       $(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(INSTALL_DIR)/system32/config
+       $(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(INSTALL_DIR)/system32/config bootdata/hiveinst.inf
 
 .PHONY: all depends implib clean clean_before install freeldr bootcd_directory_layout \
 bootcd_bootstrap_files bootcd_install_before bootcd_basic bootcd_makecd ubootcd_unattend bootcd
@@ -256,8 +285,9 @@ $(SYS_SVC:%=%_install): %_install:
 $(APPS): %:
        $(MAKE) -C apps/$*
 
-$(APPS:%=%_implib): %_implib:
-       $(MAKE) -C apps/$* implib
+# Not needed
+# $(APPS:%=%_implib): %_implib:
+#      $(MAKE) -C apps/$* implib
 
 $(APPS:%=%_clean): %_clean:
        $(MAKE) -C apps/$* clean
@@ -442,6 +472,28 @@ $(DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
         $(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_bootcd)
 
 
+#
+# Video device driver rules
+#
+VIDEO_DRIVERS: 
+       $(MAKE) -C drivers/video
+
+VIDEO_DRIVERS_implib:
+       $(MAKE) -C drivers/video implib
+
+VIDEO_DRIVERS_clean:
+       $(MAKE) -C drivers/video clean
+
+VIDEO_DRIVERS_install:
+       $(MAKE) -C drivers/video install
+
+VIDEO_DRIVERS_bootcd:
+       $(MAKE) -C drivers/video bootcd
+
+.PHONY: VIDEO_DRIVERS VIDEO_DRIVERS_implib VIDEO_DRIVERS_clean \
+        VIDEO_DRIVERS_install VIDEO_DRIVERS_bootcd
+
+
 #
 # Input driver rules
 #
@@ -463,7 +515,6 @@ $(INPUT_DRIVERS:%=%_bootcd): %_bootcd:
 .PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_clean)\
         $(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_bootcd)
 
-
 #
 # Filesystem driver rules
 #
@@ -779,6 +830,7 @@ install_dirs:
        $(RMKDIR) $(INSTALL_DIR)/system32
        $(RMKDIR) $(INSTALL_DIR)/system32/config
        $(RMKDIR) $(INSTALL_DIR)/system32/drivers
+       $(RMKDIR) $(INSTALL_DIR)/system32/drivers/etc
 
 install_before:
        $(CP) bootc.lst $(INSTALL_DIR)/bootc.lst
@@ -789,6 +841,8 @@ install_before:
        $(CP) media/nls/c_1252.nls $(INSTALL_DIR)/system32/ansi.nls
        $(CP) media/nls/c_437.nls $(INSTALL_DIR)/system32/oem.nls
        $(CP) media/nls/l_intl.nls $(INSTALL_DIR)/system32/casemap.nls
+       $(CP) media/drivers/etc/services \
+               $(INSTALL_DIR)/system32/drivers/etc/services
 
 .PHONY: install_clean install_dirs install_before
 
@@ -804,6 +858,15 @@ docu:
        echo generating ReactOS drivers documentation ...
        $(MAKE) -C drivers docu
 
+       echo generating ReactOS NTDLL documentation ...
+       $(MAKE) -C lib/ntdll docu
+
+       echo generating ReactOS Freetype documentation ...
+       $(MAKE) -C lib/freetype docu
+
+       echo generating ReactOS libs documentation ...
+       $(MAKE) -C lib docu
+
        echo generating ReactOS WIN32K documentation ...
        $(MAKE) -C subsys/win32k docu
 
@@ -811,7 +874,7 @@ docu:
        $(MAKE) -C apps docu
 
        echo generating ReactOS explorer documentation ...
-       $(MAKE) -C subsys/system/explorer
+       $(MAKE) -C subsys/system/explorer full-docu
 
        echo generating remaining ReactOS documentation ...
        doxygen Doxyfile
@@ -820,3 +883,4 @@ docu:
 
 
 # EOF
+