merged in MDL fix and a makefile mod from the 0.1.4 release branch. This represents...
[reactos.git] / reactos / Makefile
index 2de48ff..589a4d7 100644 (file)
@@ -1,3 +1,4 @@
+# $Id: Makefile,v 1.175 2003/10/15 22:16:43 vizzini Exp $
 #
 # Global makefile
 #
@@ -34,11 +35,11 @@ LIB_FSLIB = vfatlib
 LIB_STATIC = string rosrtl epsapi zlib
 
 # User mode libraries
-# advapi32 crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll ole32
-# oleaut32 epsapi psapi rpcrt4 secur32 shell32 user32 version ws2help ws2_32 wsock32 wshirda
-DLLS = advapi32 crtdll fmifs freetype gdi32 kernel32 packet msafd msvcrt ntdll \
-       psapi secur32 syssetup user32 version winedbgc winspool ws2help ws2_32 \
-       wsock32 wshirda
+# advapi32 cards crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll
+# epsapi psapi richedit rpcrt4 secur32 user32 version ws2help ws2_32 wsock32 wshirda mswsock
+DLLS = advapi32 cards crtdll fmifs freetype gdi32 kernel32 packet lzexpand msafd \
+       msvcrt ntdll psapi richedit secur32 syssetup twain user32 version winedbgc \
+       winspool ws2help ws2_32 wsock32 wshirda iphlpapi kbdus mswsock msimg32
 
 SUBSYS = smss win32k csrss ntvdm
 
@@ -59,11 +60,10 @@ DRIVERS_LIB = bzip2
 # 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
+DEVICE_DRIVERS = beep blue debugout floppy null serial vga videoprt bootvid
 
 # Kernel mode input drivers
-# keyboard mouclass psaux sermouse
-INPUT_DRIVERS = keyboard mouclass psaux
+INPUT_DRIVERS = keyboard mouclass psaux sermouse
 
 # Kernel mode file system drivers
 # cdfs ext2 fs_rec ms np vfat
@@ -74,16 +74,16 @@ FS_DRIVERS = cdfs fs_rec ms np vfat mup ntfs
 NET_DRIVERS = afd ndis npf tcpip tdi wshtcpip
 
 # Kernel mode networking device drivers
-# ne2000
-NET_DEVICE_DRIVERS = ne2000
+# ne2000 pcnet
+NET_DEVICE_DRIVERS = ne2000 pcnet
 
 # Kernel mode storage drivers
 # atapi cdrom class2 disk scsiport
-STORAGE_DRIVERS = atapi cdrom class2 disk scsiport
+STORAGE_DRIVERS = atapi cdrom class2 disk scsiport diskdump
 
 # System applications
-# autochk cmd format gstart services setup usetup winlogon
-SYS_APPS = autochk cmd format gstart services setup usetup winlogon
+# autochk cmd format gstart services setup usetup welcome winlogon
+SYS_APPS = autochk cmd format gstart services setup usetup welcome winlogon
 
 # System services
 # rpcss eventlog
@@ -148,22 +148,63 @@ dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
       $(NET_APPS:%=%_dist) \
       $(APPS:%=%_dist) $(EXT_MODULES:%=%_dist)
 
-bootcd_directory_layout:
+FREELDR_DIR = ../freeldr
+
+freeldr:
+       $(MAKE) -C $(FREELDR_DIR)
+
+bootcd_directory_layout: freeldr
        $(RMKDIR) $(BOOTCD_DIR)
        $(RMKDIR) $(BOOTCD_DIR)/bootdisk
        $(RMKDIR) $(BOOTCD_DIR)/loader
        $(RMKDIR) $(BOOTCD_DIR)/reactos
        $(RMKDIR) $(BOOTCD_DIR)/reactos/system32
+       $(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/../isoboot.bin
+       $(CP) ${FREELDR_DIR}/bootsect/dosmbr.bin ${BOOTCD_DIR}/loader/dosmbr.bin
+       $(CP) ${FREELDR_DIR}/bootsect/ext2.bin ${BOOTCD_DIR}/loader/ext2.bin
+       $(CP) ${FREELDR_DIR}/bootsect/fat.bin ${BOOTCD_DIR}/loader/fat.bin
+       $(CP) ${FREELDR_DIR}/bootsect/fat32.bin ${BOOTCD_DIR}/loader/fat32.bin
+       $(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/loader/isoboot.bin
+       $(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${BOOTCD_DIR}/loader/freeldr.sys
+       $(CP) ${FREELDR_DIR}/freeldr/obj/i386/setupldr.sys ${BOOTCD_DIR}/loader/setupldr.sys
 
 bootcd_bootstrap_files: $(COMPONENTS:%=%_bootcd) $(HALS:%=%_bootcd) $(BUS:%=%_bootcd) \
        $(LIB_STATIC:%=%_bootcd) $(LIB_FSLIB:%=%_bootcd) $(DLLS:%=%_bootcd) $(KERNEL_DRIVERS:%=%_bootcd) \
        $(SUBSYS:%=%_bootcd) $(SYS_APPS:%=%_bootcd)
 
-bootcd: all bootcd_directory_layout bootcd_bootstrap_files
-       $(MAKE) install INSTALL_DIR=$(BOOTCD_DIR)/reactos INSTALL_SYMBOLS=no BOOTCD_INSTALL=yes
+bootcd_install_before:
+       $(RLINE) bootdata/autorun.inf $(BOOTCD_DIR)/autorun.inf
+       $(RLINE) bootdata/readme.txt $(BOOTCD_DIR)/readme.txt
+       $(RLINE) bootdata/hivecls.inf $(BOOTCD_DIR)/reactos/hivecls.inf
+       $(RLINE) bootdata/hivedef.inf $(BOOTCD_DIR)/reactos/hivedef.inf
+       $(RLINE) bootdata/hivesft.inf $(BOOTCD_DIR)/reactos/hivesft.inf
+       $(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) 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
+
+bootcd_basic: all bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
+
+bootcd_makecd:
+       $(CABMAN) /C bootdata/packages/reactos.dff /L $(BOOTCD_DIR)/reactos /I
+       $(CABMAN) /C bootdata/packages/reactos.dff /RC $(BOOTCD_DIR)/reactos/reactos.inf /L $(BOOTCD_DIR)/reactos /N
+       - $(RM) $(BOOTCD_DIR)/reactos/reactos.inf
+       $(TOOLS_PATH)/cdmake/cdmake -v -m -b $(BOOTCD_DIR)/../isoboot.bin $(BOOTCD_DIR) REACTOS ReactOS.iso
+
+ubootcd_unattend:
+       $(CP) bootdata/unattend.inf $(BOOTCD_DIR)/reactos/unattend.inf
+
+bootcd: bootcd_basic bootcd_makecd
+
+ubootcd: bootcd_basic ubootcd_unattend bootcd_makecd
+
+registry: tools
+       $(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(INSTALL_DIR)/system32/config
 
-.PHONY: all depends implib clean clean_before install dist bootcd_directory_layout \
-bootcd_bootstrap_files bootcd
+.PHONY: all depends implib clean clean_before install dist freeldr bootcd_directory_layout \
+bootcd_bootstrap_files bootcd_install_before bootcd_basic bootcd_makecd ubootcd_unattend bootcd
 
 
 #
@@ -790,13 +831,14 @@ install_dirs:
        $(RMKDIR) $(INSTALL_DIR)
 
 install_before:
-#      $(RLINE) bootdata/autorun.inf $(INSTALL_DIR)/../autorun.inf
+       $(RLINE) bootdata/autorun.inf $(INSTALL_DIR)/../autorun.inf
        $(RLINE) bootdata/readme.txt $(INSTALL_DIR)/../readme.txt
        $(RLINE) bootdata/hivecls.inf $(INSTALL_DIR)/hivecls.inf
        $(RLINE) bootdata/hivedef.inf $(INSTALL_DIR)/hivedef.inf
        $(RLINE) bootdata/hivesft.inf $(INSTALL_DIR)/hivesft.inf
        $(RLINE) bootdata/hivesys.inf $(INSTALL_DIR)/hivesys.inf
        $(RLINE) bootdata/txtsetup.sif $(INSTALL_DIR)/txtsetup.sif
+       $(CP) bootdata/icon.ico $(INSTALL_DIR)/../icon.ico
        $(CP) media/fonts $(INSTALL_DIR)
        $(CP) media/nls $(INSTALL_DIR)