Major update of the build system:
authorCasper Hornstrup <chorns@users.sourceforge.net>
Tue, 21 Aug 2001 20:13:17 +0000 (20:13 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Tue, 21 Aug 2001 20:13:17 +0000 (20:13 +0000)
- Created helper makefile for all targets
- Made most makefiles simpler by using the helper makefile
- Moved build tools into ./tools

Updated installation instructions

svn path=/trunk/; revision=2185

124 files changed:
reactos/.cvsignore
reactos/INSTALL
reactos/Makefile
reactos/apps/tests/alive/Makefile
reactos/apps/tests/apc/makefile
reactos/apps/tests/args/makefile
reactos/apps/tests/atomtest/makefile
reactos/apps/tests/bench/makefile
reactos/apps/tests/consume/Makefile
reactos/apps/tests/count/Makefile
reactos/apps/tests/dump_shared_data/makefile
reactos/apps/tests/event/makefile
reactos/apps/tests/file/Makefile
reactos/apps/tests/gditest/makefile
reactos/apps/tests/hello/makefile
reactos/apps/tests/lpc/makefile
reactos/apps/tests/mstest/Makefile
reactos/apps/tests/nptest/Makefile
reactos/apps/tests/pteb/Makefile
reactos/apps/tests/regtest/makefile
reactos/apps/tests/shm/makefile
reactos/apps/tests/thread/makefile
reactos/apps/tests/vmtest/Makefile
reactos/apps/utils/cat/makefile
reactos/apps/utils/net/ping/makefile
reactos/apps/utils/net/roshttpd/makefile
reactos/apps/utils/net/telnet/Makefile
reactos/apps/utils/objdir/makefile
reactos/boot.bat
reactos/config [moved from reactos/ntoskrnl/config with 77% similarity]
reactos/drivers/bus/acpi/makefile
reactos/drivers/bus/isapnp/makefile
reactos/drivers/dd/beep/makefile
reactos/drivers/dd/blue/makefile
reactos/drivers/dd/floppy/Makefile
reactos/drivers/dd/ide/makefile
reactos/drivers/dd/mouse/makefile
reactos/drivers/dd/null/makefile
reactos/drivers/dd/parallel/makefile
reactos/drivers/dd/ramdrv/makefile
reactos/drivers/dd/sdisk/makefile
reactos/drivers/dd/serial/makefile
reactos/drivers/dd/test/makefile
reactos/drivers/dd/vga/display/makefile
reactos/drivers/dd/vga/miniport/makefile
reactos/drivers/dd/vidport/makefile
reactos/drivers/fs/ext2/ext2fs.rc [moved from reactos/drivers/fs/ext2/ext2.rc with 100% similarity]
reactos/drivers/fs/ext2/makefile
reactos/drivers/fs/minix/Makefile
reactos/drivers/fs/ms/Makefile
reactos/drivers/fs/np/Makefile
reactos/drivers/fs/template/makefile
reactos/drivers/fs/vfat/makefile
reactos/drivers/input/keyboard/makefile
reactos/drivers/input/mouclass/makefile
reactos/drivers/input/psaux/makefile
reactos/drivers/input/sermouse/makefile
reactos/drivers/net/afd/makefile
reactos/drivers/net/dd/ne2000/Makefile
reactos/drivers/net/dd/ne2000/ne2000.def [deleted file]
reactos/drivers/net/dd/ne2000/ne2000.edf [deleted file]
reactos/drivers/net/ndis/Makefile
reactos/drivers/net/tcpip/makefile
reactos/drivers/net/tdi/Makefile
reactos/drivers/net/tditest/makefile
reactos/drivers/net/wshtcpip/makefile
reactos/drivers/storage/class2/makefile
reactos/drivers/storage/disk/makefile
reactos/drivers/storage/scsiport/makefile
reactos/include/.cvsignore [new file with mode: 0644]
reactos/include/ddk/halddk.h
reactos/include/ddk/kdfuncs.h
reactos/include/ddk/psfuncs.h
reactos/lib/advapi32/makefile
reactos/lib/crtdll/makefile
reactos/lib/fmifs/makefile
reactos/lib/gdi32/makefile
reactos/lib/kernel32/makefile
reactos/lib/msafd/makefile
reactos/lib/msvcrt/Makefile
reactos/lib/ntdll/def/ntdll.rc [moved from reactos/lib/ntdll/ntdll.rc with 100% similarity]
reactos/lib/ntdll/makefile
reactos/lib/ole32/makefile
reactos/lib/oleaut32/makefile
reactos/lib/secur32/Makefile
reactos/lib/shell32/makefile
reactos/lib/user32/makefile_rex
reactos/lib/user32/user32_specs [deleted file]
reactos/lib/version/makefile
reactos/lib/ws2_32/makefile
reactos/loaders/dos/makefile
reactos/ntoskrnl/.cvsignore
reactos/ntoskrnl/Makefile
reactos/ntoskrnl/Makefile.i386
reactos/ntoskrnl/include/internal/debug.h
reactos/ntoskrnl/include/internal/ldr.h
reactos/ntoskrnl/include/internal/ps.h
reactos/ntoskrnl/io/parttab.c [new file with mode: 0644]
reactos/ntoskrnl/io/xhaldrv.c
reactos/ntoskrnl/ke/main.c
reactos/ntoskrnl/ldr/loader.c
reactos/ntoskrnl/ntoskrnl.def
reactos/ntoskrnl/ntoskrnl.edf
reactos/ntoskrnl/ntoskrnl.lnk
reactos/ntoskrnl/ps/thread.c
reactos/rules.mak
reactos/subsys/csrss/makefile
reactos/subsys/smss/makefile
reactos/subsys/system/lsass/makefile
reactos/subsys/system/services/makefile
reactos/subsys/system/shell/makefile
reactos/subsys/system/winlogon/makefile
reactos/subsys/win32k/makefile
reactos/tools/.cvsignore [new file with mode: 0644]
reactos/tools/Makefile [new file with mode: 0644]
reactos/tools/config.mk [new file with mode: 0644]
reactos/tools/depend.mk [new file with mode: 0644]
reactos/tools/depends.c [new file with mode: 0644]
reactos/tools/helper.mk [new file with mode: 0644]
reactos/tools/mkconfig.c [new file with mode: 0644]
reactos/tools/rcopy.c [moved from reactos/rcopy.c with 100% similarity]
reactos/tools/rdel.c [moved from reactos/rdel.c with 93% similarity]
reactos/tools/rmkdir.c [moved from reactos/rmkdir.c with 100% similarity]
reactos/tools/rrmdir.c [new file with mode: 0644]

index dfd1759..02d7947 100644 (file)
@@ -1,2 +1,8 @@
 dist
-errors
+reactos
+*.sys
+*.exe
+*.dll
+*.a
+*.o
+*.coff
index 7da4170..ac16809 100644 (file)
@@ -1,39 +1,74 @@
 1. Build environment
 
-To build the system you need either mingw32 installed on Windows or a
-mingw32 cross compiler running on unix.
+To build the system you need either mingw32 installed on Windows or a mingw32
+cross compiler running on unix.
 
-2. Building
 
-To build from Windows run make. To build from unix, edit rules.mak and change 
-the PREFIX variable to the correct value for your cross-compiler, then run 
-'make'.
+2. Building ReactOS
+
+To build from Windows run 'make' (wihout the quotes) from the top directory.
+To build from unix, edit rules.mak and change the PREFIX variable to the
+correct value for your cross-compiler, then run 'make'.
+
 
 3. Installation
 
-Installation isn't yet automated, sorry. The system can only be installed on
-the first partition which must be formatted for DOS. Set up a directory
-structure like the following
+The system can only be installed on the first partition on the first harddisk.
+The partition must be formatted as FAT16 or FAT32. The system can only be
+started from DOS and not from a Windows DOS-prompt.
+
+ReactOS can be installed from the source distribution or from the binary
+distribution. The two ways to install ReactOS are explained below.
+
+
+3.1 Installation from sources
+
+To install ReactOS after building it, type 'make install'. This will create
+the directory 'reactos' in the top directory. Copy this directory to the root
+of your first partition on your first harddisk. This is usually c:\ on a
+Windows machine.
+
+If you don't want to copy the files manually every time you run a 'make install',
+you can specify the directory where the files are to be copied to during
+installation.
+
+In rules.mak find the variable INSTALL_DIR and change the assigned value to the
+name of the directory where the files are to be copied to. If you are using
+Windows this could be:
+
+    INSTALL_DIR = c:\reactos
 
-make directories C:\reactos,C:\reactos\system32,C:\reactos\system32\drivers
+If you are on linux this could be:
 
-Copy apps/system/shell/shell.exe to C:\reactos\system32
-Copy subsys/smss/smss.exe to C:\reactos\system32
-Copy apps/system/winlogon/winlogon.exe to C:\reactos\system32
-Copy apps/system/services/services.exe to C:\reactos\system32
-Copy services/input/keyboard/keyboard.sys to C:\reactos\system32\drivers
-Copy services/dd/blue/blue.sys to C:\reactos\system32\drivers
-Copy lib/ntdll/ntdll.dll to C:\reactos\system32
-Copy lib/kernel32/kernel32.dll to C:\reactos\system32
-Copy lib/crtdll/crtdll.dll to C:\reactos\system32
+    INSTALL_DIR = /mnt/windows/reactos
 
-The system can only be started from DOS. Copy the following files,
-services/dd/ide/ide.sys, services/fs/vfat/vfatfsd.sys
-ntoskrnl/ntoskrnl.exe and loaders/dos/loadros.com, to a suitable
-directory, such as C:\. The system can then be booted with the
-command 'loadros.com ntoskrnl.exe ide.sys vfatfs.sys'.
+Save the changes to rules.mak and run 'make install' to install the files to
+the new location.
 
 
+3.2 Installation from binany distribution
+
+To install ReactOS from the binary distribution, extract the archive contents
+to c:\reactos. Remember to extract the files with full paths.
+
+
+4. Booting ReactOS
+
+Startup in DOS mode. 'cd' to c:\reactos and type 'boot' and press <enter>.
+ReactOS will now boot and when it has booted, you are asked for a username and
+password. Just press <enter> twice as ReactOS does not currently have user
+validation. A simple shell is started where you can use simple commands like
+'cd' and 'dir'.
+
 You may also want to try running the enhanced shell, cmd.exe, found in
-the rosapps CVS module.  For more information see the doc directory
+the rosapps CVS module.
+
+
+5. Help
+
+If you run into problems or have suggestions for making ReactOS better, please
+surf to the address below and subscribe to one or more of the mailing lists.
+
+http://www.reactos.com/home/mailing.html
 
+ReactOS Development Team
index 6b3b101..ec35b24 100644 (file)
@@ -2,23 +2,18 @@
 # Global makefile
 #
 
-#
-# Select your host
-#
-#HOST = mingw32-linux
-#HOST = mingw32-windows
-
 PATH_TO_TOP = .
 
-include rules.mak
+include $(PATH_TO_TOP)/rules.mak
 
 #
 # Required to run the system
 #
-COMPONENTS = iface_native iface_additional ntoskrnl
+COMPONENTS = iface_native iface_additional hallib ntoskrnl
+HALS = halx86
 BUS = acpi isapnp
 DLLS = ntdll kernel32 advapi32 crtdll msvcrt fmifs gdi32 msafd \
-       ole32 oleaut32 secur32 shell32 user32 ws2_32 
+       ole32 oleaut32 secur32 shell32 user32 ws2_32 version
 SUBSYS = smss win32k csrss
 
 #
@@ -46,7 +41,7 @@ INPUT_DRIVERS = keyboard mouclass psaux
 FS_DRIVERS = vfat ms np
 
 #NET_DRIVERS = ndis tdi tcpip tditest wshtcpip afd
-NET_DRIVERS = ndis tcpip tditest wshtcpip afd
+NET_DRIVERS = ndis tdi tcpip tditest wshtcpip afd
 
 #NET_DEVICE_DRIVERS = ne2000
 NET_DEVICE_DRIVERS = ne2000
@@ -59,64 +54,44 @@ STORAGE_DRIVERS = class2 scsiport disk
 #
 # system applications (required for startup)
 #
-#SYS_APPS = shell winlogon services
-SYS_APPS = shell winlogon services
+#SYS_APPS = lsass services shell winlogon
+SYS_APPS = services shell winlogon
 
 APPS = args hello test cat bench apc shm lpc thread event file gditest \
        pteb consume dump_shared_data vmtest regtest alive mstest nptest \
        objdir atomtest
 
 #NET_APPS = ping roshttpd telnet
-NET_APPS = ping
+NET_APPS = ping roshttpd
 
 
-KERNEL_SERVICES = $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS)  \
+KERNEL_SERVICES = $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
        $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS)
 
-all: rdel$(EXE_POSTFIX) buildno $(COMPONENTS) $(BUS) $(DLLS)  \
-       $(SUBSYS) $(LOADERS) $(KERNEL_SERVICES) $(SYS_APPS) $(APPS) $(NET_APPS)
+all: tools buildno dk $(COMPONENTS) $(HALS) $(BUS) $(DLLS) $(SUBSYS) \
+     $(LOADERS) $(KERNEL_SERVICES) $(SYS_APPS) $(APPS) $(NET_APPS)
 
-.PHONY: all
-
-clean: rdel$(EXE_POSTFIX) buildno_clean $(COMPONENTS:%=%_clean) \
-       $(BUS:%=%_clean) $(DLLS:%=%_clean) \
+clean: buildno_clean dk_clean $(HALS:%=%_clean) \
+       $(COMPONENTS:%=%_clean) $(BUS:%=%_clean) $(DLLS:%=%_clean) \
        $(LOADERS:%=%_clean) $(KERNEL_SERVICES:%=%_clean) $(SUBSYS:%=%_clean) \
-       $(SYS_APPS:%=%_clean) $(APPS:%=%_clean) $(NET_APPS:%=%_clean)
-
-.PHONY: clean
-
-ifeq ($(HOST),mingw32-linux)
-rcopy$(EXE_POSTFIX): rcopy.c
-       $(HOST_CC) -g -DUNIX_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
-endif
-ifeq ($(HOST),mingw32-windows)
-rcopy$(EXE_POSTFIX): rcopy.c
-       $(HOST_CC) -g -DDOS_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
-endif
-
-ifeq ($(HOST),mingw32-linux)
-rmkdir$(EXE_POSTFIX): rmkdir.c
-       $(HOST_CC) -g -DUNIX_PATHS rmkdir.c -o rmkdir$(EXE_POSTFIX)
-endif
-ifeq ($(HOST),mingw32-windows)
-rmkdir$(EXE_POSTFIX): rmkdir.c
-       $(HOST_CC) -g -DDOS_PATHS rmkdir.c -o rmkdir$(EXE_POSTFIX)
-endif
-
-rdel$(EXE_POSTFIX): rdel.c
-       $(HOST_CC) -g rdel.c -liberty -o rdel$(EXE_POSTFIX)
-
-install: rcopy$(EXE_POSTFIX) rmkdir$(EXE_POSTFIX) make_install_dirs autoexec_install \
-        $(COMPONENTS:%=%_install) $(BUS:%=%_install) \
-        $(DLLS:%=%_install) $(LOADERS:%=%_install) \
-        $(KERNEL_SERVICES:%=%_install) $(SUBSYS:%=%_install) \
-        $(SYS_APPS:%=%_install) $(APPS:%=%_install)
-
-dist: rcopy$(EXE_POSTFIX) clean_dist_dir make_dist_dirs $(COMPONENTS:%=%_dist) \
-      $(BUS:%=%_dist) $(DLLS:%=%_dist) \
+       $(SYS_APPS:%=%_clean) $(APPS:%=%_clean) $(NET_APPS:%=%_clean) clean_after tools_clean
+
+clean_after:
+       $(RM) $(PATH_TO_TOP)/include/roscfg.h
+
+install: tools buildno install_dirs install_before \
+              $(COMPONENTS:%=%_install) $(HALS:%=%_install) $(BUS:%=%_install) \
+         $(DLLS:%=%_install) $(LOADERS:%=%_install) \
+         $(KERNEL_SERVICES:%=%_install) $(SUBSYS:%=%_install) \
+         $(SYS_APPS:%=%_install) $(APPS:%=%_install)
+
+dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
+      $(HALS:%=%_dist) $(COMPONENTS:%=%_dist) $(BUS:%=%_dist) $(DLLS:%=%_dist) \
       $(LOADERS:%=%_dist) $(KERNEL_SERVICES:%=%_dist) $(SUBSYS:%=%_dist) \
       $(SYS_APPS:%=%_dist) $(APPS:%=%_dist) $(NET_APPS:%=%_dist)
 
+.PHONY: all clean clean_before install dist
+
 #
 # Build number generator
 #
@@ -183,6 +158,61 @@ $(NET_APPS:%=%_install): %_install:
 
 .PHONY: $(NET_APPS) $(NET_APPS:%=%_clean) $(NET_APPS:%=%_install) $(NET_APPS:%=%_dist)
 
+
+#
+# Tools
+#
+tools:
+       make -C tools
+
+tools_clean:
+       make -C tools clean
+
+tools_install:
+
+tools_dist:
+
+.PHONY: tools tools_clean tools_install tools_dist
+
+
+#
+# Developer Kits
+#
+dk:
+       $(RMKDIR) $(DK_PATH)
+       $(RMKDIR) $(DDK_PATH)
+       $(RMKDIR) $(DDK_PATH_LIB)
+       $(RMKDIR) $(DDK_PATH_INC)
+       $(RMKDIR) $(SDK_PATH)
+       $(RMKDIR) $(SDK_PATH_LIB)
+       $(RMKDIR) $(SDK_PATH_INC)
+       $(RMKDIR) $(XDK_PATH)
+       $(RMKDIR) $(XDK_PATH_LIB)
+       $(RMKDIR) $(XDK_PATH_INC)
+
+# WARNING! Be very sure that there are no important files
+#          in these directories before cleaning them!!!
+dk_clean:
+       $(RM) $(DDK_PATH_LIB)/*.a
+# $(RM) $(DDK_PATH_INC)/*.h
+       $(RMDIR) $(DDK_PATH_LIB)
+#      $(RMDIR) $(DDK_PATH_INC)
+       $(RM) $(SDK_PATH_LIB)/*.a
+# $(RM) $(SDK_PATH_INC)/*.h
+       $(RMDIR) $(SDK_PATH_LIB)
+#      $(RMDIR) $(SDK_PATH_INC)
+       $(RM) $(XDK_PATH_LIB)/*.a
+#      $(RM) $(XDK_PATH_INC)/*.h
+       $(RMDIR) $(XDK_PATH_LIB)
+#      $(RMDIR) $(XDK_PATH_INC)
+
+dk_install:
+
+dk_dist:
+
+.PHONY: dk dk_clean dk_install dk_dist
+
+
 #
 # Interfaces
 #
@@ -368,6 +398,42 @@ ntoskrnl_dist:
 
 .PHONY: ntoskrnl ntoskrnl_clean ntoskrnl_install ntoskrnl_dist
 
+#
+# Hardware Abstraction Layer import library
+#
+
+hallib:
+       make -C hal/hal
+
+hallib_clean:
+       make -C hal/hal clean
+
+hallib_install:
+       make -C hal/hal install
+
+hallib_dist:
+       make -C hal/hal dist
+
+.PHONY: hallib hallib_clean hallib_install hallib_dist
+
+#
+# Hardware Abstraction Layers
+#
+
+$(HALS): %:
+       make -C hal/$*
+
+$(HALS:%=%_clean): %_clean:
+       make -C hal/$* clean
+
+$(HALS:%=%_install): %_install:
+       make -C hal/$* install
+
+$(HALS:%=%_dist): %_dist:
+       make -C hal/$* dist
+
+.PHONY: $(HALS) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist)
+
 #
 # Required DLLs
 #
@@ -406,54 +472,75 @@ $(SUBSYS:%=%_dist): %_dist:
         $(SUBSYS:%=%_dist)
 
 #
-# Make an install floppy
+# Create an installation
 #
-make_install_dirs:
-       ./rmkdir $(FLOPPY_DIR)/dlls
-       ./rmkdir $(FLOPPY_DIR)/apps
-       ./rmkdir $(FLOPPY_DIR)/drivers
-       ./rmkdir $(FLOPPY_DIR)/subsys
 
+install_clean:
+       $(RM) $(INSTALL_DIR)/system32/drivers/*.*
+       $(RM) $(INSTALL_DIR)/system32/config/*.*
+       $(RM) $(INSTALL_DIR)/system32/*.*
+       $(RM) $(INSTALL_DIR)/symbols/*.*
+       $(RM) $(INSTALL_DIR)/media/fonts/*.*
+       $(RM) $(INSTALL_DIR)/media/*.*
+       $(RM) $(INSTALL_DIR)/bin/*.*
+       $(RM) $(INSTALL_DIR)/*.com
+       $(RM) $(INSTALL_DIR)/*.bat
+       $(RMDIR) $(INSTALL_DIR)/system32/drivers
+       $(RMDIR) $(INSTALL_DIR)/system32/config
+       $(RMDIR) $(INSTALL_DIR)/system32
+       $(RMDIR) $(INSTALL_DIR)/symbols
+       $(RMDIR) $(INSTALL_DIR)/media/fonts
+       $(RMDIR) $(INSTALL_DIR)/media
+       $(RMDIR) $(INSTALL_DIR)/bin
+       $(RMDIR) $(INSTALL_DIR)
 
-.PHONY: make_install_dirs
+install_dirs:
+       $(RMKDIR) $(INSTALL_DIR)
+       $(RMKDIR) $(INSTALL_DIR)/bin
+       $(RMKDIR) $(INSTALL_DIR)/media
+       $(RMKDIR) $(INSTALL_DIR)/media/fonts
+       $(RMKDIR) $(INSTALL_DIR)/symbols
+       $(RMKDIR) $(INSTALL_DIR)/system32
+       $(RMKDIR) $(INSTALL_DIR)/system32/config
+       $(RMKDIR) $(INSTALL_DIR)/system32/drivers
 
-autoexec_install: $(FLOPPY_DIR)/autoexec.bat
+install_before:
+       $(CP) boot.bat $(INSTALL_DIR)/boot.bat
+       $(CP) media/fonts/helb____.ttf $(INSTALL_DIR)/media/fonts/helb____.ttf
+       $(CP) media/fonts/timr____.ttf $(INSTALL_DIR)/media/fonts/timr____.ttf
+
+.PHONY: install_clean install_dirs install_before
 
-$(FLOPPY_DIR)/autoexec.bat: bootflop.bat
-       $(CP) bootflop.bat $(FLOPPY_DIR)/autoexec.bat
 
 #
 # Make a distribution saveset
 #
 
-clean_dist_dir:
-ifeq ($(DOSCLI),yes)
-       - $(RM) $(DIST_DIR)\dlls\*.dll
-       - $(RM) $(DIST_DIR)\apps\*.exe
-       - $(RM) $(DIST_DIR)\drivers\*.sys
-       - $(RM) $(DIST_DIR)\subsys\*.exe
-       - $(RMDIR) $(DIST_DIR)\dlls
-       - $(RMDIR) $(DIST_DIR)\apps
-       - $(RMDIR) $(DIST_DIR)\drivers
-       - $(RMDIR) $(DIST_DIR)\subsys
-       - $(RMDIR) $(DIST_DIR)
-else
-       $(RM) -r $(DIST_DIR)
-endif
+dist_clean:
+       $(RM) $(DIST_DIR)/symbols/*.sym
+       $(RM) $(DIST_DIR)/drivers/*.sys
+       $(RM) $(DIST_DIR)/subsys/*.exe
+       $(RM) $(DIST_DIR)/dlls/*.dll
+       $(RM) $(DIST_DIR)/apps/*.exe
+       $(RM) $(DIST_DIR)/*.exe
+       $(RMDIR) $(DIST_DIR)/symbols
+       $(RMDIR) $(DIST_DIR)/subsys
+       $(RMDIR) $(DIST_DIR)/drivers
+       $(RMDIR) $(DIST_DIR)/dlls
+       $(RMDIR) $(DIST_DIR)/apps
+       $(RMDIR) $(DIST_DIR)
 
-make_dist_dirs: ./rmkdir
-       ./rmkdir $(DIST_DIR)
-       ./rmkdir $(DIST_DIR)/dlls
-       ./rmkdir $(DIST_DIR)/apps
-       ./rmkdir $(DIST_DIR)/drivers
-       ./rmkdir $(DIST_DIR)/dlls
-       ./rmkdir $(DIST_DIR)/subsys
+dist_dirs:
+       $(RMKDIR) $(DIST_DIR)
+       $(RMKDIR) $(DIST_DIR)/apps
+       $(RMKDIR) $(DIST_DIR)/dlls
+       $(RMKDIR) $(DIST_DIR)/drivers
+       $(RMKDIR) $(DIST_DIR)/subsys
+       $(RMKDIR) $(DIST_DIR)/symbols
+
+.PHONY: dist_clean dist_dirs
 
-.PHONY: clean_dist_dir make_dist_dirs
 
-#
-#
-#
 etags:
        find . -name "*.[ch]" -print | etags --language=c -
 
index 4562d2b..e124c8d 100644 (file)
@@ -1,47 +1,21 @@
-#
-#
-#
-PATH_TO_TOP=../..
+# $Id: Makefile,v 1.4 2001/08/21 20:12:59 chorns Exp $
 
-TARGET_NAME=alive
+PATH_TO_TOP = ../..
 
-OBJECTS=\
-       $(TARGET_NAME).o
+TARGET_NORC = yes
 
-LIBRARIES=\
-       $(PATH_TO_TOP)/lib/kernel32/kernel32.a\
-       $(PATH_TO_TOP)/lib/crtdll/crtdll.a\
-       $(PATH_TO_TOP)/lib/user32/user32.a
+TARGET_TYPE = program
 
-PROGS=\
-       $(TARGET_NAME).exe
+TARGET_APPTYPE = console
 
-BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+TARGET_NAME = alive
 
-all: $(PROGS)
+TARGET_SDKLIBS = kernel32.a crtdll.a user32.a
 
-.phony: all
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-clean:
-       - $(RM) $(TARGET_NAME).o $(TARGET_NAME).exe $(TARGET_NAME).sym
-
-.phony: clean
-
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
-
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-
-dist: $(PROGS:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%)
-
-$(PROGS:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%): $(PATH_TO_TOP)/$(DIST_DIR)/apps/%: %
-       $(CP) $* $(PATH_TO_TOP)/$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-$(TARGET_NAME).exe: $(OBJECTS)
-       $(CC)\
-               $(OBJECTS)\
-               $(LIBRARIES)\
-               -o $(TARGET_NAME).exe
-       $(NM) --numeric-sort $(TARGET_NAME).exe > $(TARGET_NAME).sym
+include $(TOOLS_PATH)/helper.mk
 
-include $(PATH_TO_TOP)/rules.mak
+# EOF
index 82e6f21..8af54d2 100644 (file)
@@ -1,38 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-CFLAGS = -g
-
-OBJECTS= apc.o
-PROGS= apc.exe
+# $Id: makefile,v 1.8 2001/08/21 20:12:59 chorns Exp $
 
-BASE_CFLAGS = -I../../include
-LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a \
-       ../../lib/ntdll/ntdll.a
-
-all: $(PROGS)
+PATH_TO_TOP = ../..
 
-.phony: all
+TARGET_NORC = yes
 
-clean:
-       - $(RM) apc.o apc.exe apc.sym
+TARGET_TYPE = program
 
-.phony: clean
+TARGET_APPTYPE = console
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_NAME = apc
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_SDKLIBS = ntdll.a kernel32.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-apc.exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o apc.exe
-       $(NM) --numeric-sort apc.exe > apc.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index e8aeeda..5f686c6 100644 (file)
@@ -1,34 +1,19 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-OBJECTS= args.o
-PROGS= args.exe
-
-BASE_CFLAGS = -I../../include
+# $Id: makefile,v 1.14 2001/08/21 20:13:00 chorns Exp $
 
-all: $(PROGS)
-
-.phony: all
+PATH_TO_TOP = ../..
 
-clean:
-       - $(RM) args.o args.exe args.sym
+TARGET_NORC = yes
 
-.phony: clean
+TARGET_TYPE = program
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_APPTYPE = console
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_NAME = args
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-args.exe: $(OBJECTS)
-       $(CC) $(OBJECTS) -o args.exe
-       $(NM) --numeric-sort args.exe > args.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 5968d45..bcb0854 100644 (file)
@@ -1,34 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-OBJECTS = atomtest.o
-PROGS = atomtest.exe
-LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a \
-       ../../lib/ntdll/ntdll.a
+# $Id: makefile,v 1.3 2001/08/21 20:13:00 chorns Exp $
 
-CLEAN_FILES = atomtest.o atomtest.exe
+PATH_TO_TOP = ../..
 
-all: atomtest.exe
+TARGET_NORC = yes
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_TYPE = program
 
-.phony: clean 
+TARGET_APPTYPE = console
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_NAME = atomtest
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_SDKLIBS = ntdll.a kernel32.a crtdll.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-atomtest.exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o atomtest.exe
-       $(NM) --numeric-sort atomtest.exe > atomtest.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index dc72e68..c9c5617 100644 (file)
@@ -1,31 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-PROGS = bench-thread
+# $Id: makefile,v 1.9 2001/08/21 20:13:00 chorns Exp $
 
-all: $(PROGS:%=%.exe)
+PATH_TO_TOP = ../..
 
-.phony: all
+TARGET_NORC = yes
 
-clean: 
-       - $(RM) *.o *.exe *.sym
+TARGET_TYPE = program
 
-.phony: clean
+TARGET_APPTYPE = console
 
-install: # $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
+TARGET_NAME = bench-thread
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
+TARGET_SDKLIBS = kernel32.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
+include $(PATH_TO_TOP)/rules.mak
 
-bench-thread.exe: bench-thread.c
-       $(CC) $(CFLAGS) bench-thread.c -lkernel32 -o bench-thread.exe
-       $(NM) --numeric-sort bench-thread.exe > bench-thread.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index f04a5ba..be71145 100644 (file)
@@ -1,31 +1,19 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-OBJECTS = consume.o
-PROGS = consume.exe
-LIBS = 
-CLEAN_FILES = consume.o consume.exe
+# $Id: Makefile,v 1.6 2001/08/21 20:13:00 chorns Exp $
 
-all: consume.exe
+PATH_TO_TOP = ../..
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_NORC = yes
 
-.phony: clean 
+TARGET_TYPE = program
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_APPTYPE = console
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_NAME = consume
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-consume.exe: $(OBJECTS)
-       $(CC) $(OBJECTS) -o consume.exe
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 3acc37c..66dd348 100644 (file)
@@ -1,47 +1,21 @@
-#
-#
-#
-PATH_TO_TOP=../..
+# $Id: Makefile,v 1.4 2001/08/21 20:13:00 chorns Exp $
 
-TARGET_NAME=count
+PATH_TO_TOP = ../..
 
-OBJECTS=\
-       $(TARGET_NAME).o
+TARGET_NORC = yes
 
-LIBRARIES=\
-       $(PATH_TO_TOP)/lib/kernel32/kernel32.a\
-       $(PATH_TO_TOP)/lib/crtdll/crtdll.a\
-       $(PATH_TO_TOP)/lib/user32/user32.a
+TARGET_TYPE = program
 
-PROGS=\
-       $(TARGET_NAME).exe
+TARGET_APPTYPE = console
 
-BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+TARGET_NAME = count
 
-all: $(PROGS)
+TARGET_SDKLIBS = kernel32.a crtdll.a user32.a
 
-.phony: all
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-clean:
-       - $(RM) $(TARGET_NAME).o $(TARGET_NAME).exe $(TARGET_NAME).sym
-
-.phony: clean
-
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
-
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-
-dist: $(PROGS:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%)
-
-$(PROGS:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%): $(PATH_TO_TOP)/$(DIST_DIR)/apps/%: %
-       $(CP) $* $(PATH_TO_TOP)/$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-$(TARGET_NAME).exe: $(OBJECTS)
-       $(CC)\
-               $(OBJECTS)\
-               $(LIBRARIES)\
-               -o $(TARGET_NAME).exe
-       $(NM) --numeric-sort $(TARGET_NAME).exe > $(TARGET_NAME).sym
+include $(TOOLS_PATH)/helper.mk
 
-include $(PATH_TO_TOP)/rules.mak
+# EOF
index a4532cd..813fc26 100644 (file)
@@ -1,32 +1,20 @@
-#
-#
-#
-PATH_TO_TOP = ../..
+# $Id: makefile,v 1.5 2001/08/21 20:13:01 chorns Exp $
 
-OBJECTS = dump_shared_data.o
-PROGS = dump_shared_data.exe
-LIBS = 
-CLEAN_FILES = dump_shared_data.o dump_shared_data.exe
+PATH_TO_TOP = ../..
 
-all: dump_shared_data.exe
+TARGET_NORC = yes
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_TYPE = program
 
-.phony: clean 
+TARGET_APPTYPE = console
 
-floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_NAME = dump_shared_data
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+include $(PATH_TO_TOP)/rules.mak
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(TOOLS_PATH)/helper.mk
 
-dump_shared_data.exe: $(OBJECTS)
-       $(CC) $(OBJECTS) -o dump_shared_data.exe
+# EOF
 
-BASE_CFLAGS = -I../../include
-include ../../rules.mak
index 8606774..49e29b8 100644 (file)
@@ -1,31 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-PROGS = event
+# $Id: makefile,v 1.6 2001/08/21 20:13:02 chorns Exp $
 
-all: $(PROGS:%=%.exe)
+PATH_TO_TOP = ../..
 
-.phony: all
+TARGET_NORC = yes
 
-clean: 
-       - $(RM) *.o *.exe *.sym
+TARGET_TYPE = program
 
-.phony: clean
+TARGET_APPTYPE = console
 
-install: # $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
+TARGET_NAME = event
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
+TARGET_SDKLIBS = kernel32.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
+include $(PATH_TO_TOP)/rules.mak
 
-event.exe: event.c
-       $(CC) $(CFLAGS) event.c -lkernel32 -o event.exe
-       $(NM) --numeric-sort event.exe > event.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index d39f4ca..59f242c 100644 (file)
@@ -1,43 +1,19 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-OBJECTS= file.o
-PROGS= file.exe
-
-BASE_CFLAGS = -I../../include
-
-all: $(PROGS)
-
-.phony: all
-
-clean:
-       - $(RM) file.o file.exe file.sym
-
-.phony: clean
-
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
-
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
-
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
-
-file.exe: $(OBJECTS)
-       $(CC) $(OBJECTS) $(BASE_CFLAGS) -o file.exe
-       $(NM) --numeric-sort file.exe > file.sym
-
-include ../../rules.mak
+# $Id: Makefile,v 1.7 2001/08/21 20:13:02 chorns Exp $
 
+PATH_TO_TOP = ../..
 
+TARGET_NORC = yes
 
+TARGET_TYPE = program
 
+TARGET_APPTYPE = console
 
+TARGET_NAME = file
 
+TARGET_OBJECTS = $(TARGET_NAME).o
 
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
 
+# EOF
index 8f9b064..266332c 100644 (file)
@@ -1,35 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-PROGS = gditest
+# $Id: makefile,v 1.7 2001/08/21 20:13:02 chorns Exp $
 
-OBJECTS = 
-LIBS= ../../lib/kernel32/kernel32.a ../../lib/gdi32/gdi32.a
-CFLAGS = -I../../include
-
-all: $(PROGS:%=%.exe)
+PATH_TO_TOP = ../..
 
-.phony: all
+TARGET_NORC = yes
 
-clean:
-       - $(RM) *.o *.exe *.sym
+TARGET_TYPE = program
 
-.phony: clean
+TARGET_APPTYPE = console
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
+TARGET_NAME = gditest
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
+TARGET_SDKLIBS = kernel32.a gdi32.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
+include $(PATH_TO_TOP)/rules.mak
 
-gditest.exe: gditest.c
-       $(CC) $(CFLAGS) gditest.c $(LIBS) -o gditest.exe
-       $(NM) --numeric-sort gditest.exe > gditest.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 561900f..c895841 100644 (file)
@@ -1,31 +1,19 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-OBJECTS = hello.o
-PROGS = hello.exe
-LIBS = 
-CLEAN_FILES = hello.o hello.exe
+# $Id: makefile,v 1.15 2001/08/21 20:13:03 chorns Exp $
 
-all: hello.exe
+PATH_TO_TOP = ../..
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_NORC = yes
 
-.phony: clean 
+TARGET_TYPE = program
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_APPTYPE = console
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_NAME = hello
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-hello.exe: $(OBJECTS)
-       $(CC) $(OBJECTS) -o hello.exe
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 0d7f630..f43b60d 100644 (file)
@@ -3,14 +3,18 @@
 #
 PATH_TO_TOP = ../..
 
+include $(PATH_TO_TOP)/rules.mak
+
 SRV_OBJECTS= lpcsrv.o
 CLT_OBJECTS= lpcclt.o
 
 PROGS= lpcsrv.exe lpcclt.exe
 
-BASE_CFLAGS = -I../../include
-LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a \
-       ../../lib/ntdll/ntdll.a
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+
+LIBS = $(SDK_PATH_LIB)/crtdll.a \
+  $(SDK_PATH_LIB)/kernel32.a \
+  $(SDK_PATH_LIB)/ntdll.a
 
 all: $(PROGS)
 
@@ -21,15 +25,15 @@ clean:
        
 .phony: clean
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
+       $(CP) $* $(INSTALL_DIR)/bin/$*
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+dist: $(PROGS:%=$(DIST_DIR)/apps/%)
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
+       $(CP) $* $(DIST_DIR)/apps/$*
 
 lpcsrv.exe: $(SRV_OBJECTS) $(LIBS)
        $(CC) $(SRV_OBJECTS) $(LIBS) -o lpcsrv.exe
@@ -38,6 +42,3 @@ lpcsrv.exe: $(SRV_OBJECTS) $(LIBS)
 lpcclt.exe: $(CLT_OBJECTS) $(LIBS)
        $(CC) $(CLT_OBJECTS) $(LIBS) -o lpcclt.exe
        $(NM) --numeric-sort lpcclt.exe > lpcclt.sym
-
-
-include ../../rules.mak
index 3e3d19e..053450c 100644 (file)
@@ -3,13 +3,18 @@
 #
 PATH_TO_TOP = ../..
 
+include $(PATH_TO_TOP)/rules.mak
+
 SRV_OBJECTS = msserver.o
 CLT_OBJECTS = msclient.o
 
 PROGS = msserver.exe msclient.exe
 
-BASE_CFLAGS = -I../../include
-LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+
+LIBS = $(SDK_PATH_LIB)/crtdll.a \
+  $(SDK_PATH_LIB)/kernel32.a \
+  $(SDK_PATH_LIB)/ntdll.a
 
 all: $(PROGS)
 
@@ -20,15 +25,15 @@ clean:
 
 .phony: clean
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
+       $(CP) $* $(INSTALL_DIR)/bin/$*
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+dist: $(PROGS:%=$(DIST_DIR)/apps/%)
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
+       $(CP) $* $(DIST_DIR)/apps/$*
 
 msserver.exe: $(SRV_OBJECTS) $(LIBS)
        $(CC) $(SRV_OBJECTS) $(LIBS) -o msserver.exe
@@ -37,6 +42,3 @@ msserver.exe: $(SRV_OBJECTS) $(LIBS)
 msclient.exe: $(CLT_OBJECTS) $(LIBS)
        $(CC) $(CLT_OBJECTS) $(LIBS) -o msclient.exe
        $(NM) --numeric-sort msclient.exe > msclient.sym
-
-
-include ../../rules.mak
index bc94bc8..0f808f0 100644 (file)
@@ -3,13 +3,17 @@
 #
 PATH_TO_TOP = ../..
 
+include $(PATH_TO_TOP)/rules.mak
+
 SRV_OBJECTS = npserver.o
 CLT_OBJECTS = npclient.o
 
 PROGS = npserver.exe npclient.exe
 
-BASE_CFLAGS = -I../../include
-LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+
+LIBS = $(SDK_PATH_LIB)/crtdll.a \
+  $(SDK_PATH_LIB)/kernel32.a
 
 all: $(PROGS)
 
@@ -20,15 +24,15 @@ clean:
 
 .phony: clean
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
+       $(CP) $* $(INSTALL_DIR)/bin/$*
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+dist: $(PROGS:%=$(DIST_DIR)/apps/%)
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
+       $(CP) $* $(DIST_DIR)/apps/$*
 
 npserver.exe: $(SRV_OBJECTS) $(LIBS)
        $(CC) $(SRV_OBJECTS) $(LIBS) -o npserver.exe
@@ -37,6 +41,3 @@ npserver.exe: $(SRV_OBJECTS) $(LIBS)
 npclient.exe: $(CLT_OBJECTS) $(LIBS)
        $(CC) $(CLT_OBJECTS) $(LIBS) -o npclient.exe
        $(NM) --numeric-sort npclient.exe > npclient.sym
-
-
-include ../../rules.mak
index 5d7c2c4..8eb4452 100644 (file)
@@ -1,31 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
+# $Id: Makefile,v 1.6 2001/08/21 20:13:04 chorns Exp $
 
-OBJECTS = pteb.o
-PROGS = pteb.exe
-LIBS = 
-CLEAN_FILES = pteb.o pteb.exe
+PATH_TO_TOP = ../..
 
-all: pteb.exe
+TARGET_NORC = yes
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_TYPE = program
 
-.phony: clean 
+TARGET_APPTYPE = console
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_NAME = pteb
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_SDKLIBS = ntdll.a kernel32.a crtdll.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-pteb.exe: $(OBJECTS)
-       $(CC) $(OBJECTS) -o pteb.exe
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 7140932..400744c 100644 (file)
@@ -1,36 +1,22 @@
 #
-#
-#
-PATH_TO_TOP = ../..
+# $Id: makefile,v 1.6 2001/08/21 20:13:04 chorns Exp $
 
-OBJECTS= regtest.o
-PROGS= regtest.exe
-LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a \
-      ../../lib/advapi32/advapi32.a
-
-BASE_CFLAGS = -I../../include
-
-all: $(PROGS)
+PATH_TO_TOP = ../..
 
-.phony: all
+TARGET_NORC = yes
 
-clean:
-       - $(RM) *.o *.exe *.sym
+TARGET_TYPE = program
 
-.phony: clean
+TARGET_APPTYPE = console
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_NAME = regtest
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-regtest.exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o regtest.exe
-       $(NM) --numeric-sort regtest.exe > regtest.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index e8abb30..bca6189 100644 (file)
@@ -3,14 +3,18 @@
 #
 PATH_TO_TOP = ../..
 
+include $(PATH_TO_TOP)/rules.mak
+
 SRV_OBJECTS= shmsrv.o
 CLT_OBJECTS= shmclt.o
 
 PROGS= shmsrv.exe shmclt.exe
 
-BASE_CFLAGS = -I../../include
-LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a \
-       ../../lib/ntdll/ntdll.a
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+
+LIBS = $(SDK_PATH_LIB)/crtdll.a \
+  $(SDK_PATH_LIB)/kernel32.a \
+  $(SDK_PATH_LIB)/ntdll.a
 
 all: $(PROGS)
 
@@ -21,15 +25,15 @@ clean:
 
 .phony: clean
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
+       $(CP) $* $(INSTALL_DIR)/bin/$*
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+dist: $(PROGS:%=$(DIST_DIR)/apps/%)
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
+       $(CP) $* $(DIST_DIR)/apps/$*
 
 shmsrv.exe: $(SRV_OBJECTS) $(LIBS)
        $(CC) $(SRV_OBJECTS) $(LIBS) -o shmsrv.exe
@@ -39,5 +43,4 @@ shmclt.exe: $(CLT_OBJECTS) $(LIBS)
        $(CC) $(CLT_OBJECTS) $(LIBS) -o shmclt.exe
        $(NM) --numeric-sort shmsrv.exe > shmclt.sym
 
-
-include ../../rules.mak
+# EOF
index 05b001c..66763ab 100644 (file)
@@ -1,31 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-PROGS = thread
+# $Id: makefile,v 1.6 2001/08/21 20:13:05 chorns Exp $
 
-all: $(PROGS:%=%.exe)
+PATH_TO_TOP = ../..
 
-.phony: all
+TARGET_NORC = yes
 
-clean: 
-       - $(RM) *.o *.exe *.sym
+TARGET_TYPE = program
 
-.phony: clean
+TARGET_APPTYPE = console
 
-install: # $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
+TARGET_NAME = thread
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
+TARGET_SDKLIBS = kernel32.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
-       $(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
+include $(PATH_TO_TOP)/rules.mak
 
-thread.exe: thread.c
-       $(CC) $(CFLAGS) thread.c -lkernel32 -o thread.exe
-       $(NM) --numeric-sort thread.exe > thread.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 6b4a1ed..f9b04c1 100644 (file)
@@ -1,31 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
+# $Id: Makefile,v 1.4 2001/08/21 20:13:05 chorns Exp $
 
-OBJECTS = vmtest.o
-PROGS = vmtest.exe
-LIBS = 
-CLEAN_FILES = vmtest.o vmtest.exe
+PATH_TO_TOP = ../..
 
-all: vmtest.exe
+TARGET_NORC = yes
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_TYPE = program
 
-.phony: clean 
+TARGET_APPTYPE = console
 
-floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_NAME = vmtest
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_SDKLIBS = ntdll.a kernel32.a crtdll.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-vmtest.exe: $(OBJECTS)
-       $(CC) $(OBJECTS) -o vmtest.exe
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 779006b..0a85329 100644 (file)
@@ -1,34 +1,19 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-OBJECTS= cat.o
-PROGS= cat.exe
-
-all: cat.exe
+# $Id: makefile,v 1.9 2001/08/21 20:13:00 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) cat.o cat.exe cat.sym
+PATH_TO_TOP = ../..
 
-.phony: clean
+TARGET_NORC = yes
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_TYPE = program
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_APPTYPE = console
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_NAME = cat
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-.PHONY: floppy dist
+include $(PATH_TO_TOP)/rules.mak
 
-cat.exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) -o cat.exe
-       $(NM) --numeric-sort cat.exe > cat.sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index 1043f59..9c155e0 100644 (file)
@@ -1,37 +1,19 @@
-#
-# ReactOS Ping Utility
-#
-PATH_TO_TOP = ../../..
-
-TARGETNAME=ping
-CFLAGS = -I../../../include
-
-OBJECTS = $(TARGETNAME).o $(TARGETNAME).coff
-PROGS = $(TARGETNAME).exe
-LIBS = ../../../lib/ntdll/ntdll.a \
-       ../../../lib/ws2_32/ws2_32.a
+# $Id: makefile,v 1.7 2001/08/21 20:13:03 chorns Exp $
 
-CLEAN_FILES = $(TARGETNAME).o $(TARGETNAME).exe $(TARGETNAME).sym
-
-all: $(TARGETNAME).exe
+PATH_TO_TOP = ../../..
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_TYPE = program
 
-.phony: clean 
+TARGET_APPTYPE = console
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_NAME = ping
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_SDKLIBS = ntdll.a ws2_32.a
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
-$(TARGETNAME).exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o $(TARGETNAME).exe
-       $(NM) --numeric-sort $(TARGETNAME).exe > $(TARGETNAME).sym
+include $(TOOLS_PATH)/helper.mk
 
-include ../../../rules.mak
+# EOF
index f1d56ed..927a2e2 100644 (file)
@@ -1,49 +1,29 @@
-#
-# ReactOS HTTP Daemon
-#
-PATH_TO_TOP = ../../..
+# $Id: makefile,v 1.5 2001/08/21 20:13:03 chorns Exp $
 
-TARGETNAME=roshttpd
+PATH_TO_TOP = ../../..
 
-CFLAGS = -Iinclude -DUNICODE -D_UNICODE -DDBG
+TARGET_PATH = common
 
-MAIN_OBJECTS = $(TARGETNAME).o config.o error.o http.o httpd.o
-COMMON_OBJECTS = common/list.o common/socket.o common/thread.o common/$(TARGETNAME).coff
+TARGET_TYPE = program
 
-OBJECTS = $(MAIN_OBJECTS) $(COMMON_OBJECTS)
-PROGS = $(TARGETNAME).exe
-LIBS = ../../../lib/kernel32/kernel32.a \
-       ../../../lib/ws2_32/ws2_32.a \
-       ../../../lib/user32/user32.a
+TARGET_APPTYPE = console
 
-CLEAN_FILES = *.o $(TARGETNAME).exe $(TARGETNAME).sym common/*.o
+TARGET_NAME = roshttpd
 
-all: $(TARGETNAME).exe
+TARGET_CPPFLAGS = -I./include -DUNICODE -D_UNICODE -DDBG
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_SDKLIBS = kernel32.a ws2_32.a user32.a
 
-.phony: clean 
+MAIN_OBJECTS = roshttpd.o config.o error.o http.o httpd.o
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+COMMON_OBJECTS = common/list.o common/socket.o common/thread.o
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-ifeq ($(DOSCLI),yes)
-       $(CP) $* $(FLOPPY_DIR)\apps\$*
-else
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-endif
+TARGET_OBJECTS = $(MAIN_OBJECTS) $(COMMON_OBJECTS)
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_CLEAN = common/*.o
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-ifeq ($(DOSCLI),yes)
-       $(CP) $* ..\..\$(DIST_DIR)\apps\$*
-else
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
-endif
+include $(PATH_TO_TOP)/rules.mak
 
-$(TARGETNAME).exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o $(TARGETNAME).exe
+include $(TOOLS_PATH)/helper.mk
 
-include ../../../rules.mak
+# EOF
index f18b72e..a541527 100644 (file)
@@ -1,73 +1,26 @@
-# $Id: Makefile,v 1.2 2001/07/15 21:18:52 rex Exp $
-#
-# ReactOS Network Virtual Terminal (telnet) console client
-#
-PATH_TO_TOP=../../..
-PATH_TO_LIB=$(PATH_TO_TOP)/lib
+# $Id: Makefile,v 1.3 2001/08/21 20:13:03 chorns Exp $
 
-TARGET_NAME=telnet
+PATH_TO_TOP = ../../..
 
-OBJECTS=\
+TARGET_TYPE = program
+
+TARGET_APPTYPE = console
+
+TARGET_NAME = telnet
+
+TARGET_SDKLIBS = crtdll.a kernel32.a ws2_32.a
+
+TARGET_OBJECTS = \
        ansi.o          \
        console.o       \
        helpsock.o      \
        main.o          \
        nvt.o           \
        telnet.o        \
-       vm.o            \
-       $(TARGET_NAME).coff
-
-LIBRARIES=\
-       $(PATH_TO_LIB)/crtdll/crtdll.a          \
-       $(PATH_TO_LIB)/kernel32/kernel32.a      \
-       $(PATH_TO_LIB)/ws2_32/ws2_32.a
-
-PROGS=$(TARGET_NAME).exe
-       
-CLEAN_FILES = *.o $(TARGET_NAME).exe $(TARGET_NAME).sym
-
-all: $(TARGET_NAME).exe
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.phony: clean 
-
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
-
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-ifeq ($(DOSCLI),yes)
-       $(CP) $* $(FLOPPY_DIR)\apps\$*
-else
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-endif
-
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
-
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-ifeq ($(DOSCLI),yes)
-       $(CP) $* ..\..\$(DIST_DIR)\apps\$*
-else
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
-endif
-
-ansi.o: telnet.h
-
-helpsock.o: telnet.h
-
-main.o: telnet.h
-
-nvt.o: telnet.h
-
-telnet.o: telnet.h
-
-telnet.coff: $(PATH_TO_TOP)/include/reactos/resource.h
-
-vm.o: telnet.h
-
-$(TARGET_NAME).exe: $(OBJECTS) $(LIBRARIES)
-       $(CC) $(OBJECTS) $(LIBRARIES) -o $(TARGET_NAME).exe
+       vm.o
 
 include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
+
 # EOF
index 8041a67..6c08b31 100644 (file)
@@ -1,43 +1,21 @@
-#
-#
-#
-PATH_TO_TOP = ../..
-
-TARGET_NAME=objdir
-OBJECTS= $(TARGET_NAME).o
-
-
-PROGS= $(TARGET_NAME).exe 
+# $Id: makefile,v 1.8 2001/08/21 20:13:04 chorns Exp $
 
-BASE_CFLAGS = -I../../include -g
-LIB_BASE=../../lib
-LIBS = \
-       $(LIB_BASE)/ntdll/ntdll.a \
-       $(LIB_BASE)/kernel32/kernel32.a \
-       $(LIB_BASE)/crtdll/crtdll.a
-
-all: $(PROGS)
-
-.phony: all
+PATH_TO_TOP = ../..
 
-clean:
-       - $(RM) $(TARGET_NAME).o $(TARGET_NAME).exe $(TARGET_NAME).sym
+TARGET_NORC = yes
 
-.phony: clean
+TARGET_TYPE = program
 
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
+TARGET_APPTYPE = console
 
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
+TARGET_NAME = objdir
 
-dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
+TARGET_SDKLIBS = ntdll.a kernel32.a crtdll.a
 
-$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../$(DIST_DIR)/apps/$*
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(TARGET_NAME).exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o $(TARGET_NAME).exe
-       $(NM) --numeric-sort $(TARGET_NAME).exe > $(TARGET_NAME).sym
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index d3a4000..50ef275 100644 (file)
@@ -1 +1 @@
-loadros ntoskrnl.exe ide.sys vfatfs.sys\r
+loadros system32\ntoskrnl.exe system32\hal.dll system32\drivers\ide.sys system32\drivers\vfatfs.sys
\ No newline at end of file
similarity index 77%
rename from reactos/ntoskrnl/config
rename to reactos/config
index aea410e..1b36a16 100644 (file)
@@ -1,6 +1,8 @@
 #
 # Architecture to build for
 #
+# Specify one of: i386
+# Possibble values in the future: alpha,i386,m68k,mips,powerpc
 ARCH := i386
 
 #
index 94f7464..545b1f5 100644 (file)
@@ -1,13 +1,31 @@
+# $Id: makefile,v 1.6 2001/08/21 20:13:10 chorns Exp $
+
 PATH_TO_TOP = ../../..
 
-TARGET=acpi
+TARGET_TYPE = driver
 
-CFLAGS = -D__NTDRIVER__ -I./include -I./ospm/include
+TARGET_NAME = acpi
 
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
+TARGET_CFLAGS = -I./include -I./ospm/include
 
 OBJECTS_PATH = objects
 
+TARGET_OBJECTS = $(OBJECTS_PATH)/$(TARGET_NAME).o
+
+TARGET_CLEAN = \
+  $(OBJECTS_PATH)/*.o \
+  dispatcher/*.o \
+  events/*.o \
+  executer/*.o \
+  hardware/*.o \
+  namespace/*.o \
+  ospm/*.o \
+  ospm/busmgr/*.o \
+  parser/*.o \
+  resource/*.o \
+  tables/*.o \
+  utils/*.o
+
 
 OBJECTS_OSPM_BUSMGR = \
   ospm/busmgr/bm.o \
@@ -138,80 +156,76 @@ OBJECTS_UTILS = \
   utils/cmxface.o
 
 
-all: $(TARGET).sys
-
-.phony: all
-
+include $(PATH_TO_TOP)/rules.mak
 
-$(OBJECTS_PATH):
-       mkdir $(OBJECTS_PATH)
+include $(TOOLS_PATH)/helper.mk
 
 
 #
 # Build intermediate objects
 #
-$(OBJECTS_PATH)/ospm.o: $(OBJECTS_PATH) $(OBJECTS_OSPM)
+$(OBJECTS_PATH)/ospm.o: $(OBJECTS_OSPM)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/ospm.o \
                $(OBJECTS_OSPM)
 
-$(OBJECTS_PATH)/dispatcher.o: $(OBJECTS_PATH) $(OBJECTS_DISPATCHER)
+$(OBJECTS_PATH)/dispatcher.o: $(OBJECTS_DISPATCHER)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/dispatcher.o \
                $(OBJECTS_DISPATCHER)
 
-$(OBJECTS_PATH)/events.o: $(OBJECTS_PATH) $(OBJECTS_EVENTS)
+$(OBJECTS_PATH)/events.o: $(OBJECTS_EVENTS)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/events.o \
                $(OBJECTS_EVENTS)
 
-$(OBJECTS_PATH)/executer.o: $(OBJECTS_PATH) $(OBJECTS_EXECUTER)
+$(OBJECTS_PATH)/executer.o: $(OBJECTS_EXECUTER)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/executer.o \
                $(OBJECTS_EXECUTER)
 
-$(OBJECTS_PATH)/hardware.o: $(OBJECTS_PATH) $(OBJECTS_HARDWARE)
+$(OBJECTS_PATH)/hardware.o: $(OBJECTS_HARDWARE)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/hardware.o \
                $(OBJECTS_HARDWARE)
 
-$(OBJECTS_PATH)/namespace.o: $(OBJECTS_PATH) $(OBJECTS_NAMESPACE)
+$(OBJECTS_PATH)/namespace.o: $(OBJECTS_NAMESPACE)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/namespace.o \
                $(OBJECTS_NAMESPACE)
 
-$(OBJECTS_PATH)/parser.o: $(OBJECTS_PATH) $(OBJECTS_PARSER)
+$(OBJECTS_PATH)/parser.o: $(OBJECTS_PARSER)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/parser.o \
                $(OBJECTS_PARSER)
 
-$(OBJECTS_PATH)/resource.o: $(OBJECTS_PATH) $(OBJECTS_RESOURCE)
+$(OBJECTS_PATH)/resource.o: $(OBJECTS_RESOURCE)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/resource.o \
                $(OBJECTS_RESOURCE)
 
-$(OBJECTS_PATH)/tables.o: $(OBJECTS_PATH) $(OBJECTS_TABLES)
+$(OBJECTS_PATH)/tables.o: $(OBJECTS_TABLES)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/tables.o \
                $(OBJECTS_TABLES)
 
-$(OBJECTS_PATH)/utils.o: $(OBJECTS_PATH) $(OBJECTS_UTILS)
+$(OBJECTS_PATH)/utils.o: $(OBJECTS_UTILS)
        $(LD) \
                -r \
                -o $(OBJECTS_PATH)/utils.o \
                $(OBJECTS_UTILS)
 
 
-OBJECTS := \
+OBJECTS = \
   $(OBJECTS_PATH)/ospm.o \
        $(OBJECTS_PATH)/dispatcher.o \
        $(OBJECTS_PATH)/events.o \
@@ -221,70 +235,10 @@ OBJECTS := \
        $(OBJECTS_PATH)/parser.o \
        $(OBJECTS_PATH)/resource.o \
        $(OBJECTS_PATH)/tables.o \
-       $(OBJECTS_PATH)/utils.o \
-       $(TARGET).coff
-
-
-$(TARGET).coff: $(TARGET).rc $(PATH_TO_TOP)/include/reactos/resource.h
-
-$(TARGET).sys: $(OBJECTS_PATH) $(OBJECTS) $(LIBS)
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-    -Wl,-e,_DriverEntry@8 \
-    -Wl,--base-file,base.tmp \
-    -Wl,--defsym,_end=end \
-    -Wl,--defsym,_edata=__data_end__ \
-    -Wl,--defsym,_etext=etext \
-    $(OBJECTS) $(LIBS) \
-    -o junk.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-    --dllname $(TARGET).sys \
-    --base-file base.tmp \
-    --output-exp temp.exp \
-    --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-    -Wl,--image-base,0x10000 \
-    -Wl,-e,_DriverEntry@8 \
-    -Wl,temp.exp \
-    -o $(TARGET).sys \
-    $(OBJECTS) $(LIBS)
-       - $(RM) temp.exp
-       - $(NM) --numeric-sort $(TARGET).sys > $(TARGET).sym
-
-#      $(STRIP) --strip-debug $(TARGET).sys
-
-
-CLEAN_FILES = $(OBJECTS_PATH)/*.o dispatcher/*.o events/*.o executer/*.o hardware/*.o \
-              namespace/*.o ospm/*.o ospm/busmgr/*.o parser/*.o resource/*.o tables/*.o \
-              utils/*.o \
-              $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp \
-              $(TARGET).sys $(TARGET).sym $(TARGET).coff
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-WITH_DEBUGGING=yes
-WARNINGS_ARE_ERRORS = yes
+       $(OBJECTS_PATH)/utils.o
 
-include $(PATH_TO_TOP)/rules.mak
+$(OBJECTS_PATH)/$(TARGET_NAME).o: $(OBJECTS_PATH) $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(OBJECTS_PATH)/$(TARGET_NAME).o
+
+$(OBJECTS_PATH):
+       mkdir $(OBJECTS_PATH)
index 17f4825..656d4a3 100644 (file)
@@ -1,46 +1,13 @@
-PATH_TO_TOP = ../../..
-
-TARGET=isapnp
-
-CFLAGS = -D__NTDRIVER__ -I.
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-OBJECTS = \
-  isapnp.o \
-       $(TARGET).coff \
-  $(LIBS)
-
-
-all: $(TARGET).sys.unstripped $(TARGET).sys
-
-.phony: all
-
+# $Id: makefile,v 1.4 2001/08/21 20:13:10 chorns Exp $
 
-$(TARGET).coff: $(TARGET).rc $(PATH_TO_TOP)/include/reactos/resource.h
-
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS)
-
-
-CLEAN_FILES = *.o $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp \
-              $(TARGET).exe $(TARGET).nostrip.exe $(TARGET).sym $(TARGET).coff
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = isapnp
 
-WITH_DEBUGGING=yes
-WARNINGS_ARE_ERRORS = yes
+TARGET_OBJECTS = isapnp.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 55b213a..df5f368 100644 (file)
@@ -1,36 +1,13 @@
-# $Id: makefile,v 1.12 2001/07/25 06:19:24 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = beep
-
-CFLAGS = -D__NTDRIVER__
-
-OBJECTS = beep.o beep.coff 
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
+# $Id: makefile,v 1.13 2001/08/21 20:13:10 chorns Exp $
 
-.PHONY: all
-
-clean:
-       - $(RM) *.o *.sym beep.coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = beep
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_OBJECTS = beep.o
 
-WARNINGS_ARE_ERRORS = yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 356e650..c8697c0 100644 (file)
@@ -1,36 +1,13 @@
-# $Id: makefile,v 1.18 2001/07/25 06:19:34 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = blue
-
-CFLAGS = -D__NTDRIVER__
-
-OBJECTS = $(TARGET).o $(TARGET).coff 
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
+# $Id: makefile,v 1.19 2001/08/21 20:13:10 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp blue.sys blue.sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = blue
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_OBJECTS = blue.o
 
-WARNINGS_ARE_ERRORS = yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 12d968d..4390047 100644 (file)
@@ -1,42 +1,16 @@
-# $Id: Makefile,v 1.9 2001/07/25 06:19:49 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET=floppy
-
-OBJECTS = floppy.o isr.o dpc.o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -I.
-
-all: $(TARGET).sys
-
-floppy.o: floppy.h
-
-isr.o: floppy.h
+# $Id: Makefile,v 1.10 2001/08/21 20:13:10 chorns Exp $
 
-dpc.o: floppy.h
-
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = floppy
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_OBJECTS = \
+  dpc.o \
+  floppy.o \
+  isr.o
 
-WITH_DEBUGGING=yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 3c88a81..c849d26 100644 (file)
@@ -1,37 +1,15 @@
-# $Id: makefile,v 1.24 2001/07/25 06:20:01 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET=ide
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -I. -g
-
-all: $(TARGET).sys.unstripped $(TARGET).sys
+# $Id: makefile,v 1.25 2001/08/21 20:13:11 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = ide
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_OBJECTS = ide.o
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_HEADERS = *.h
 
-WITH_DEBUGGING=yes
-WARNINGS_ARE_ERRORS = yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 6300fdf..1a30072 100644 (file)
@@ -1,40 +1,13 @@
-#
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET=mouse
-OBJECTS= mouse.o ../../../ntoskrnl/ntoskrnl.a
-
-all: mouse.o
-
-.phony: all
+# $Id: makefile,v 1.9 2001/08/21 20:13:11 chorns Exp $
 
-clean:
-       - $(RM) mouse.o junk.tmp base.tmp temp.exp mouse.sys
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = mouse
 
-mouse.sys: $(OBJECTS)
-       $(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-             -Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-             -Wl,--base-file,base.tmp $(OBJECTS)
-       - $(RM) junk.tmp
-       $(DLLTOOL) --dllname mouse.sys --base-file base.tmp \
-                  --output-exp temp.exp
-       - $(RM) base.tmp
-       $(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-             -specs=../../svc_specs -mdll -o mouse.sys $(OBJECTS) -Wl,temp.exp
-       - $(RM) temp.exp
+TARGET_OBJECTS = mouse.o
 
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
index ce9ddf5..4ddd0d4 100644 (file)
@@ -1,37 +1,13 @@
-# $Id: makefile,v 1.13 2001/07/24 16:27:01 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = null
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
+# $Id: makefile,v 1.14 2001/08/21 20:13:11 chorns Exp $
 
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_NAME = null
 
-$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
+TARGET_OBJECTS = null.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 9cc600f..25f3079 100644 (file)
@@ -1,37 +1,13 @@
-# $Id: makefile,v 1.14 2001/07/24 16:27:41 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = parallel
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
+# $Id: makefile,v 1.15 2001/08/21 20:13:11 chorns Exp $
 
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_NAME = parallel
 
-$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
+TARGET_OBJECTS = parallel.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 115bf51..ae318c5 100644 (file)
@@ -1,38 +1,15 @@
-# $Id: makefile,v 1.4 2001/07/25 06:20:17 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = ramdrv
-
-OBJECTS = ramdrv.o
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -I.
-
-all: $(TARGET).sys
+# $Id: makefile,v 1.5 2001/08/21 20:13:11 chorns Exp $
 
-ramdrv.o: ramdrv.h
+# $Id: makefile,v 1.5 2001/08/21 20:13:11 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym *.coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = ramdrv
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_OBJECTS = ramdrv.o
 
-WITH_DEBUGGING=yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index c60a963..af17d39 100644 (file)
@@ -1,31 +1,13 @@
-#
-#
-#
-PATH_TO_TOP = ../../..
-
-OBJECTS= sdisk.o ../../../ntoskrnl/ntoskrnl.a
+# $Id: makefile,v 1.5 2001/08/21 20:13:11 chorns Exp $
 
-all: sdisk.sys
-
-.phony: all
+PATH_TO_TOP = ../../..
 
-clean:
-       - $(RM) sdisk.o junk.tmp base.tmp temp.exp sdisk.sys
+TARGET_TYPE = driver
 
-.phony: clean
+TARGET_NAME = sdisk
 
-sdisk.sys: $(OBJECTS)
-       $(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-             -Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-             -Wl,--base-file,base.tmp $(OBJECTS)
-       - $(RM) junk.tmp
-       $(DLLTOOL) --dllname sdisk.sys --base-file base.tmp \
-                  --output-exp temp.exp
-       - $(RM) base.tmp
-       $(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-             -specs=../../svc_specs -mdll -o sdisk.sys $(OBJECTS) -Wl,temp.exp
-       - $(RM) temp.exp
+TARGET_OBJECTS = sdisk.o
 
-WIN32_LEAN_AND_MEAN = yes
-include ../../../rules.mak
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
index ac6444a..8d99ee8 100644 (file)
@@ -1,35 +1,13 @@
-# $Id: makefile,v 1.14 2001/07/25 08:28:52 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = serial
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
+# $Id: makefile,v 1.15 2001/08/21 20:13:11 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = serial
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_OBJECTS = serial.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 6c36329..fc29a15 100644 (file)
@@ -1,35 +1,13 @@
-#
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = test
-
-OBJECTS = test.o
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS =
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
+# $Id: makefile,v 1.7 2001/08/21 20:13:12 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym *.coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = test
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_OBJECTS = test.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 0de7848..7240f79 100644 (file)
@@ -1,88 +1,39 @@
-# $Id: makefile,v 1.17 2001/07/26 16:52:07 ekohl Exp $
-#
-# Makefile for ReactOS vgaddi.dll
-#
-PATH_TO_TOP = ../../../..
-
-TARGET = vgaddi
-
-CFLAGS = -D__NTDRIVER__ -I.
-MAIN_OBJECTS = main/enable.o
-OTHER_OBJECTS = objects/screen.o objects/pointer.o objects/lineto.o objects/paint.o objects/bitblt.o \
-               vgavideo/vgavideo.o objects/transblt.o
-RESOURCE_OBJECTS = $(TARGET).coff
-
-OBJECTS = $(MAIN_OBJECTS) $(OTHER_OBJECTS) $(RESOURCE_OBJECTS)
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a \
-       $(PATH_TO_TOP)/subsys/win32k/win32k.a
+# $Id: makefile,v 1.18 2001/08/21 20:13:12 chorns Exp $
 
+PATH_TO_TOP = ../../../..
 
-all: $(TARGET).dll $(TARGET).a
-
-$(TARGET).a: $(OBJECTS)
-       $(AR) csr $(TARGET).a $(OBJECTS)
-
-$(TARGET).coff: $(TARGET).rc $(PATH_TO_TOP)/include/reactos/resource.h
-
-$(TARGET).dll: $(OBJECTS) $(LIBS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
-       $(CC) $(TARGET).o \
-               $(LIBS) \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry,_DrvEnableDriver \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) $(TARGET).o \
-               $(LIBS) \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o $(TARGET).dll \
-               -Wl,--subsystem,native \
-               -Wl,--entry,_DrvEnableDriver \
-               -Wl,--image-base,0x70000000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
+TARGET_BASE = 0x70000000
 
-CLEAN_FILES = *.o *.coff *.sym *.tmp *.dll main/*.o objects/*.o vgavideo/*.o *.a
+TARGET_TYPE = gdi_driver
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_NAME = vgaddi
 
-.PHONY: clean 
+MAIN_OBJECTS = \
+  main/enable.o
 
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
+OTHER_OBJECTS = \
+  objects/screen.o \
+  objects/pointer.o \
+  objects/lineto.o \
+  objects/paint.o \
+  objects/bitblt.o \
+  objects/transblt.o
 
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
+VGAVIDEO_OBJECTS = \
+  vgavideo/vgavideo.o  
 
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
+TARGET_OBJECTS = \
+  $(MAIN_OBJECTS) \
+  $(OTHER_OBJECTS) \
+  $(VGAVIDEO_OBJECTS)
 
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(PATH_TO_TOP)/$(DIST_DIR)/dlls/$(TARGET).dll
+TARGET_CLEAN = \
+  main/*.o \
+  objects/*.o \
+  vgavideo/*.o
 
 include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
+
 # EOF
index df035d5..9b43935 100644 (file)
@@ -1,35 +1,18 @@
-# $Id: makefile,v 1.8 2001/07/26 11:44:04 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../../..
-
-TARGET = vgamp
-
-CFLAGS = -D__NTDRIVER__
-
-OBJECTS = vgamp.o initvga.o vgavideo.o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a ../../vidport/vidport.a
-
-all: $(TARGET).sys
+# $Id: makefile,v 1.9 2001/08/21 20:13:12 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym *.coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../../..
 
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = vgamp
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_DDKLIBS = vidport.a
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_OBJECTS = \
+  initvga.o \
+  vgamp.o \
+  vgavideo.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 60e47d6..569944f 100644 (file)
@@ -1,98 +1,15 @@
-# $Id: makefile,v 1.14 2001/07/26 11:40:59 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = vidport
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__
-
-all: $(TARGET).sys $(TARGET).sys.unstripped vidport.a
+# $Id: makefile,v 1.15 2001/08/21 20:13:12 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.a *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = export_driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = vidport
 
-$(TARGET).a: $(TARGET).def
-       $(DLLTOOL) \
-               --dllname $(TARGET).sys \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
+TARGET_CFLAGS = 
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8\
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@.unstripped \
-               $^
-       - $(RM) temp.exp
-       - $(NM) --numeric-sort $@.unstripped > $@.sym
-       $(STRIP) --strip-debug $<
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@ \
-               $^
-       - $(RM) temp.exp
+TARGET_OBJECTS = vidport.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 9645697..ccd547c 100644 (file)
@@ -1,61 +1,26 @@
-# $Id: makefile,v 1.13 2001/07/24 16:29:25 ekohl Exp $
-#
-# Linux Ext2 IFS Driver
-#
+# $Id: makefile,v 1.14 2001/08/21 20:13:12 chorns Exp $
+
 PATH_TO_TOP = ../../..
 
-TARGETNAME=ext2fs
-
-OBJECTS = super.o blockdev.o inode.o file.o dir.o rw.o quota.o security.o \
-          attr.o ext2.coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -g -Wall 
-
-all: $(TARGETNAME).sys
-
-.phony: all
-
-clean:
-       - $(RM) *.o ext2.coff junk.tmp base.tmp temp.exp $(TARGETNAME).sys
-
-.phony: clean
-
-ext2fs.sys: $(OBJECTS) $(LIBS)
-       $(CC) \
-               -nostartfiles \
-               -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,--base-file,base.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -o junk.tmp \
-               $(OBJECTS) $(LIBS)
-       $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).sys \
-               --base-file base.tmp \
-               --output-exp temp.exp
-       $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry \
-               -Wl,temp.exp \
-               -o $(TARGETNAME).sys \
-               $(OBJECTS) $(LIBS)
-       $(RM) temp.exp
-
-ext2.coff: $(PATH_TO_TOP)/include/reactos/buildno.h ext2.rc
+TARGET_TYPE = driver
+
+TARGET_NAME = ext2fs
+
+TARGET_CFLAGS = -I./include -DDBG
+
+TARGET_OBJECTS = \
+  attr.o \
+  blockdev.o \
+  dir.o \
+  file.o \
+  inode.o \
+  rw.o \
+  quota.o \
+  security.o \
+  super.o
 
 include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
+
 # EOF
index dae3028..45778cc 100644 (file)
@@ -1,43 +1,22 @@
-# $Id: Makefile,v 1.7 2001/07/24 16:30:36 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = minixfs
-
-OBJECTS = $(TARGET).o minix.coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -I. -g
-
-all: $(TARGET).sys
-
-.phony: all
-
-clean:
-       - $(RM) *.o *.coff junk.tmp base.tmp temp.exp *.sym $(TARGET).sys $(TARGET).sys.unstripped
+# $Id: Makefile,v 1.8 2001/08/21 20:13:12 chorns Exp $
 
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-MOBJECTS = block.o blockdev.o cache.o dir.o inode.o mount.o rw.o bitops.o
+PATH_TO_TOP = ../../..
 
-minixfs.o: $(MOBJECTS)
-       $(LD) -r -o minixfs.o $(MOBJECTS)
+TARGET_TYPE = driver
 
-$(TARGET).sys: $(OBJECTS) minix.coff
+TARGET_NAME = minixfs
 
-minix.coff: $(PATH_TO_TOP)/include/reactos/buildno.h minix.rc
+TARGET_OBJECTS = \
+  bitops.o
+  block.o \
+  blockdev.o \
+  cache.o \
+  dir.o \
+  inode.o \
+  minixfs.o
+  mount.o \
+  rw.o
 
-WITH_DEBUGGING=yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 9d93ae3..d306729 100644 (file)
@@ -1,38 +1,18 @@
-# $Id: Makefile,v 1.6 2001/07/29 16:39:12 ekohl Exp $
-#
-# Mailslot File System
-#
-PATH_TO_TOP = ../../..
-
-TARGET = msfs
-
-OBJECTS = create.o finfo.o fsctrl.o msfs.o rw.o msfs.coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
+# $Id: Makefile,v 1.7 2001/08/21 20:13:12 chorns Exp $
 
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_NAME = msfs
 
-msfs.coff: $(PATH_TO_TOP)/include/reactos/buildno.h msfs.rc
+TARGET_OBJECTS = \
+  create.o \
+  finfo.o \
+  fsctrl.o \
+  msfs.o \
+  rw.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 00ba374..4c6e39f 100644 (file)
@@ -1,38 +1,19 @@
-# $Id: Makefile,v 1.11 2001/07/29 16:40:20 ekohl Exp $
-#
-# Named Pipes File System
-#
-PATH_TO_TOP=../../..
+# $Id: Makefile,v 1.12 2001/08/21 20:13:13 chorns Exp $
 
-TARGET = npfs
+PATH_TO_TOP = ../../..
 
-CFLAGS = -D__NTDRIVER__
+TARGET_TYPE = driver
 
-OBJECTS = create.o finfo.o fsctrl.o npfs.o rw.o volume.o npfs.coff
+TARGET_NAME = npfs
 
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-all: $(TARGET).sys.unstripped $(TARGET).sys
-
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
-
-npfs.coff: $(PATH_TO_TOP)/include/reactos/buildno.h npfs.rc
+TARGET_OBJECTS = \
+  create.o \
+  finfo.o \
+  fsctrl.o \
+  npfs.o \
+  rw.o \
+  volume.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 2149317..c600315 100644 (file)
@@ -1,20 +1,15 @@
-#
-#
-#
-OBJECTS = template.o
+# $Id: makefile,v 1.6 2001/08/21 20:13:13 chorns Exp $
 
-CFLAGS = -D__NTDRIVER__ -I../../../include
+PATH_TO_TOP = ../../..
 
-all: tfsd.o
+TARGET_TYPE = driver
 
-.phony: all
+TARGET_NAME = template
 
-clean:
-       - $(RM) template.o tfsd.o
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-.phony: clean
+include $(PATH_TO_TOP)/rules.mak
 
-tfsd.o: template.o
-       $(LD) -r template.o -o tfsd.o
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index b71a014..72fb11c 100644 (file)
-# $Id: makefile,v 1.34 2001/07/24 16:32:16 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = vfatfs
-
-OBJECTS = blockdev.o cleanup.o close.o create.o dir.o direntry.o dirwr.o  \
-          fat.o fcb.o finfo.o iface.o rw.o shutdown.o string.o volume.o  \
-          $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -g -Wall -Werror
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
+# $Id: makefile,v 1.35 2001/08/21 20:13:13 chorns Exp $
 
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-#$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
-
-$(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
-       $(LD) -r -o vfat.o $(OBJECTS)
-       $(CC) \
-               -nostartfiles \
-               -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,--base-file,base.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               vfat.o $(LIBS) \
-               -o junk.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).sys \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def vfatfs.def
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -o $(TARGET).sys.unstripped \
-               vfat.o $(LIBS)
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).sys.unstripped >$(TARGET).sym
-
-
-$(TARGET).sys: $(OBJECTS) $(LIBS)
-       $(LD) -r -o vfat.o $(OBJECTS)
-       $(STRIP) --strip-debug vfat.o
-       $(CC) \
-               -nostartfiles \
-               -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,--base-file,base.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               vfat.o $(LIBS) \
-               -o junk.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).sys \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def vfatfs.def
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -o $(TARGET).sys \
-               vfat.o $(LIBS)
-       - $(RM) temp.exp
+PATH_TO_TOP = ../../..
 
-$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h vfatfs.rc
+TARGET_TYPE = driver
+
+TARGET_NAME = vfatfs
+
+TARGET_OBJECTS = \
+  blockdev.o \
+  cleanup.o \
+  close.o \
+  create.o \
+  dir.o \
+  direntry.o \
+  dirwr.o \
+  fat.o \
+  fcb.o \
+  finfo.o \
+  iface.o \
+  rw.o \
+  shutdown.o \
+  string.o \
+  volume.o
 
-WITH_DEBUGGING=yes
-WARNINGS_ARE_ERRORS = yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 5624274..257c9d1 100644 (file)
@@ -1,38 +1,13 @@
-# $Id: makefile,v 1.6 2001/07/24 18:37:46 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = keyboard
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -O2 -I. -g
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
+# $Id: makefile,v 1.7 2001/08/21 20:13:13 chorns Exp $
 
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_NAME = keyboard
 
-$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-WARNINGS_ARE_ERRORS = yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 9500dc3..ff7302a 100644 (file)
@@ -1,37 +1,13 @@
-# $Id: makefile,v 1.6 2001/07/24 18:38:04 ekohl Exp $
-#
-#
-TARGET = mouclass
+# $Id: makefile,v 1.7 2001/08/21 20:13:14 chorns Exp $
 
 PATH_TO_TOP = ../../..
 
-OBJECTS = $(TARGET).o $(TARGET).coff
+TARGET_TYPE = driver
 
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
+TARGET_NAME = mouclass
 
-CFLAGS = -D__NTDRIVER__ -O2 -I.
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
-
-$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
+TARGET_OBJECTS = $(TARGET_NAME).o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 24ab933..431b098 100644 (file)
@@ -1,37 +1,13 @@
-# $Id: makefile,v 1.6 2001/07/24 18:38:40 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = psaux
-
-OBJECTS = $(TARGET).o controller.o mouse.o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -O2 -I.
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
+# $Id: makefile,v 1.7 2001/08/21 20:13:14 chorns Exp $
 
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_NAME = psaux
 
-$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
+TARGET_OBJECTS = $(TARGET_NAME).o controller.o mouse.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index e34e258..32b5ce0 100644 (file)
@@ -1,37 +1,15 @@
-# $Id: makefile,v 1.6 2001/07/24 18:39:02 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET = sermouse
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -O2 -I.
-
-all: $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: all
+# $Id: makefile,v 1.7 2001/08/21 20:13:15 chorns Exp $
 
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_NAME = sermouse
 
-$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
+TARGET_OBJECTS = \
+  mouse.o
+  sermouse.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index f9435f2..19db7c8 100644 (file)
@@ -1,81 +1,22 @@
-# AFD.SYS - Ancillary Function Driver
+# $Id: makefile,v 1.5 2001/08/21 20:13:15 chorns Exp $
 
 PATH_TO_TOP = ../../..
 
-TARGETNAME=afd
+TARGET_TYPE = driver
 
-CFLAGS = -D__NTDRIVER__ -I./include -DDBG
+TARGET_NAME = afd
 
-RESOURCE_OBJECT = $(TARGETNAME).coff
-AFD_OBJECTS = afd/afd.o afd/dispatch.o afd/event.o afd/opnclose.o afd/rdwr.o \
-              afd/routines.o afd/tdi.o
+TARGET_CFLAGS = -I./include -DDBG
 
-all: $(TARGETNAME).sys
+TARGET_OBJECTS = \
+  afd/afd.o \
+  afd/dispatch.o \
+  afd/event.o \
+  afd/opnclose.o \
+  afd/rdwr.o \
+  afd/routines.o \
+  afd/tdi.o
 
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
+include $(PATH_TO_TOP)/rules.mak
 
-OBJECTS = $(AFD_OBJECTS) $(RESOURCE_OBJECT) ../../../ntoskrnl/ntoskrnl.a
-
-
-CLEAN_FILES = afd/*.o $(TARGETNAME).coff $ \
-              junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
-
-$(TARGETNAME).sys: $(OBJECTS)
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,--base-file,base.tmp \
-               -Wl,--defsym,_end=end  \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-        $(OBJECTS) \
-        -o junk.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-        --dllname $(TARGETNAME).sys \
-        --base-file base.tmp \
-        --output-exp temp.exp
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-        $(OBJECTS) \
-        -o $(TARGETNAME).sys
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-ifeq ($(DOSCLI),yes)
-       $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)\drivers\$(TARGETNAME).sys
-else
-       $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-endif
-
-dist: $(DIST_DIR)/drivers/$(TARGETNAME).sys
-
-$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-ifeq ($(DOSCLI),yes)
-       $(CP) $(TARGETNAME).sys ..\..\..\$(DIST_DIR)\drivers\$(TARGETNAME).sys
-else
-       $(CP) $(TARGETNAME).sys ../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
-endif
-
-#WITH_DEBUGGING      = yes
-#WIN32_LEAN_AND_MEAN = yes
-#WARNINGS_ARE_ERRORS = yes
-include ../../../rules.mak
+include $(TOOLS_PATH)/helper.mk
index 6950aee..e94d605 100644 (file)
@@ -1,79 +1,19 @@
-# $Id: Makefile,v 1.10 2001/07/15 21:19:01 rex Exp $
-#
-#
-PATH_TO_TOP = ../../../..
-
-CFLAGS = -D__NTDRIVER__ -Iinclude
-
-TARGETNAME = ne2000
-
-RESOURCE_OBJECT  = $(TARGETNAME).coff
-NE2000_OBJECTS   = ne2000/main.o ne2000/8390.o $(RESOURCE_OBJECT)
-IMPORT_LIBS      = $(PATH_TO_TOP)/services/net/ndis/ndis.a \
-                   $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-OBJECTS = $(NE2000_OBJECTS) $(IMPORT_LIBS)
-
-all: $(TARGETNAME).sys
+# $Id: Makefile,v 1.11 2001/08/21 20:13:15 chorns Exp $
 
-$(TARGETNAME).coff: $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
-
-CLEAN_FILES = \
-               ne2000/*.o $(TARGETNAME).coff \
-        $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-               $(TARGETNAME).sys $(TARGETNAME).sym
-
-$(TARGETNAME).sys: $(OBJECTS)
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).sys \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-        $(OBJECTS) \
-        -mdll \
-        -o junk.tmp \
-        -Wl,--image-base,0x10000 \
-        -Wl,--defsym,_end=end \
-           -Wl,--defsym,_edata=__data_end__ \
-        -Wl,--defsym,_etext=etext \
-           -Wl,--base-file,base.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-        --dllname $(TARGETNAME).sys \
-        --base-file base.tmp \
-               --output-exp temp.exp \
-        --def $(TARGETNAME).edf
-       - $(RM) base.tmp
-       $(CC) \
-        $(OBJECTS) \
-        -mdll \
-        -o $(TARGETNAME).sys \
-        -Wl,--image-base,0x10000 \
-        -Wl,-e,_DriverEntry@8 \
-        -Wl,--defsym,_end=end \
-           -Wl,--defsym,_edata=__data_end__ \
-        -Wl,--defsym,_etext=etext \
-        -Wl,temp.exp 
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.phony: clean
+PATH_TO_TOP = ../../../..
 
-install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
+TARGET_TYPE = driver
 
-$(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
+TARGET_NAME = ne2000
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGETNAME).sys
+TARGET_CFLAGS = -I./include
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGETNAME).sys
+TARGET_OBJECTS = \
+  ne2000/8390.o \
+  ne2000/main.o
 
-$(TARGETNAME).sys: $(OBJECTS)
+TARGET_DDKLIBS = ndis.a
 
-WITH_DEBUGGING=yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
diff --git a/reactos/drivers/net/dd/ne2000/ne2000.def b/reactos/drivers/net/dd/ne2000/ne2000.def
deleted file mode 100644 (file)
index cb1da92..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-; Novell Eagle 2000 driver - ReactOS Operating System
-
-LIBRARY NE2000.SYS
-
-EXPORTS
-
-; EOF
diff --git a/reactos/drivers/net/dd/ne2000/ne2000.edf b/reactos/drivers/net/dd/ne2000/ne2000.edf
deleted file mode 100644 (file)
index cb1da92..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-; Novell Eagle 2000 driver - ReactOS Operating System
-
-LIBRARY NE2000.SYS
-
-EXPORTS
-
-; EOF
index 3390e8e..83f6188 100644 (file)
@@ -1,84 +1,31 @@
-# NDIS.SYS - NDIS library
-#
-PATH_TO_TOP = ../../..
-
-TARGETNAME=ndis
-
-CFLAGS = -D__NTDRIVER__ -I./include -DNDIS_WRAPPER -DBINARY_COMPATIBLE=1 -DDBG
-
-RESOURCE_OBJECT = $(TARGETNAME).coff
-NDIS_OBJECTS    = ndis/main.o ndis/40gone.o ndis/50gone.o ndis/buffer.o ndis/cl.o \
-                  ndis/cm.o ndis/co.o ndis/control.o ndis/hardware.o \
-                  ndis/io.o ndis/memory.o ndis/miniport.o \
-                 ndis/protocol.o ndis/string.o ndis/stubs.o ndis/time.o
-
-all: objects $(TARGETNAME).sys
-
-objects:
-       mkdir objects
-
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
-
-OBJECTS = $(NDIS_OBJECTS) $(RESOURCE_OBJECT) ../../../ntoskrnl/ntoskrnl.a
-
+# $Id: Makefile,v 1.13 2001/08/21 20:13:15 chorns Exp $
 
-CLEAN_FILES = *.o objects/*.o ndis/*.o $(TARGETNAME).coff $(TARGETNAME).o $(TARGETNAME).a \
-              junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
-
-$(TARGETNAME).sys: $(OBJECTS)
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).sys \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,--base-file,base.tmp \
-               -Wl,--defsym,_end=end  \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-        $(OBJECTS) \
-        -o junk.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-        --dllname $(TARGETNAME).sys \
-        --base-file base.tmp \
-        --output-exp temp.exp \
-        --def $(TARGETNAME).edf
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-        $(OBJECTS) \
-        -o $(TARGETNAME).sys
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-
-dist: $(DIST_DIR)/drivers/$(TARGETNAME).sys
-
-$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys ../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
+PATH_TO_TOP = ../../..
 
-#WITH_DEBUGGING      = yes
-#WIN32_LEAN_AND_MEAN = yes
-#WARNINGS_ARE_ERRORS = yes
-include ../../../rules.mak
+TARGET_TYPE = export_driver
+
+TARGET_NAME = ndis
+
+TARGET_CFLAGS = -I./include -DNDIS_WRAPPER -DBINARY_COMPATIBLE=1
+
+TARGET_OBJECTS = \
+  ndis/main.o \
+  ndis/40gone.o \
+  ndis/50gone.o \
+  ndis/buffer.o \
+  ndis/cl.o \
+  ndis/cm.o \
+  ndis/co.o \
+  ndis/control.o \
+  ndis/hardware.o \
+  ndis/io.o \
+  ndis/memory.o \
+  ndis/miniport.o \
+  ndis/protocol.o \
+  ndis/string.o \
+  ndis/stubs.o \
+  ndis/time.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 97827c0..c7cf379 100644 (file)
@@ -1,12 +1,24 @@
-# TCPIP.SYS - TCP/IP protocol driver
-#
+# $Id: makefile,v 1.11 2001/08/21 20:13:15 chorns Exp $
+
 PATH_TO_TOP = ../../..
 
-TARGETNAME=tcpip
+TARGET_TYPE = export_driver
+
+TARGET_NAME = tcpip
+
+TARGET_CFLAGS = -I./include -DDBG
 
-CFLAGS = -D__NTDRIVER__ -I./include -O2 -DDBG
+TARGET_DDKLIBS = ndis.a
+
+TARGET_CLEAN = \
+  tcpip/*.o \
+  datalink/*.o \
+  network/*.o \
+  transport/datagram/*.o \
+  transport/rawip/*.o \
+  transport/tcp/*.o \
+  transport/udp/*.o
 
-RESOURCE_OBJECT  = $(TARGETNAME).coff
 TCPIP_OBJECTS    = tcpip/main.o tcpip/address.o tcpip/checksum.o \
                    tcpip/dispatch.o tcpip/fileobjs.o tcpip/info.o \
                    tcpip/pool.o tcpip/routines.o
@@ -19,101 +31,15 @@ RAWIP_OBJECTS    = transport/rawip/rawip.o
 TCP_OBJECTS      = transport/tcp/tcp.o
 UDP_OBJECTS      = transport/udp/udp.o
 
-all: objects $(TARGETNAME).sys
-
-objects:
-       mkdir objects
-
-objects/tcpip.o: $(TCPIP_OBJECTS)
-       $(LD) -r -o objects/tcpip.o $(TCPIP_OBJECTS)
-
-objects/datalink.o: $(DATALINK_OBJECTS)
-       $(LD) -r -o objects/datalink.o $(DATALINK_OBJECTS)
-
-objects/network.o: $(NETWORK_OBJECTS)
-       $(LD) -r -o objects/network.o $(NETWORK_OBJECTS)
-
-objects/datagram.o: $(DATAGRAM_OBJECTS)
-       $(LD) -r -o objects/datagram.o $(DATAGRAM_OBJECTS)
-
-objects/rawip.o: $(RAWIP_OBJECTS)
-       $(LD) -r -o objects/rawip.o $(RAWIP_OBJECTS)
-
-objects/tcp.o: $(TCP_OBJECTS)
-       $(LD) -r -o objects/tcp.o $(TCP_OBJECTS)
-
-objects/udp.o: $(UDP_OBJECTS)
-       $(LD) -r -o objects/udp.o $(UDP_OBJECTS)
-
-OBJECTS = objects/tcpip.o objects/datalink.o objects/network.o \
-          objects/datagram.o objects/rawip.o objects/tcp.o objects/udp.o \
-          $(RESOURCE_OBJECT) \
-          ../../../ntoskrnl/ntoskrnl.a ../ndis/ndis.a
-
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
-
-CLEAN_FILES = \
-               *.o objects/*.o tcpip/*.o datalink/*.o network/*.o \
-        transport/datagram/*.o transport/rawip/*.o \
-        transport/tcp/*.o transport/udp/*.o $(TARGETNAME).coff \
-        $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-               $(TARGETNAME).sys $(TARGETNAME).sym
-
-
-$(TARGETNAME).sys: $(OBJECTS)
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).sys \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-        -Wl,-e,_DriverEntry@8 \
-        -Wl,--base-file,base.tmp \
-        -Wl,--defsym,_end=end \
-        -Wl,--defsym,_edata=__data_end__ \
-        -Wl,--defsym,_etext=etext \
-               $(OBJECTS) \
-        -o junk.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-        --dllname $(TARGETNAME).sys \
-        --base-file base.tmp \
-        --output-exp temp.exp \
-        --def $(TARGETNAME).edf
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-        -Wl,--image-base,0x10000 \
-        -Wl,-e,_DriverEntry@8 \
-        -Wl,temp.exp \
-               $(OBJECTS) \
-        -o $(TARGETNAME).sys
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-
-dist: $(DIST_DIR)/drivers/$(TARGETNAME).sys
+TARGET_OBJECTS = \
+  $(TCPIP_OBJECTS) \
+  $(DATALINK_OBJECTS) \
+  $(NETWORK_OBJECTS) \
+  $(DATAGRAM_OBJECTS) \
+  $(RAWIP_OBJECTS) \
+  $(TCP_OBJECTS) \
+  $(UDP_OBJECTS)
 
-$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys ../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
+include $(PATH_TO_TOP)/rules.mak
 
-#WITH_DEBUGGING      = yes
-#WIN32_LEAN_AND_MEAN = yes
-#WARNINGS_ARE_ERRORS = yes
-include ../../../rules.mak
+include $(TOOLS_PATH)/helper.mk
index ed4b522..d43692b 100644 (file)
@@ -1,96 +1,41 @@
-# $Id: Makefile,v 1.12 2001/07/15 21:19:01 rex Exp $
-#
-# TDI.SYS build spec
-#
-PATH_TO_TOP = ../../../
+# $Id: Makefile,v 1.13 2001/08/21 20:13:16 chorns Exp $
 
-TARGETNAME=tdi
+PATH_TO_TOP = ../../..
 
-CFLAGS = -D__NTDRIVER__
+TARGET_TYPE = export_driver
 
-OBJECTS_CTE = cte/stubs.o cte/string.o
-OBJECTS_TDI = tdi/stubs.o tdi/obsolete.o tdi/handler.o tdi/dereg.o
+TARGET_NAME = tdi
 
-OBJECTS_MISC = misc/main.o misc/$(TARGETNAME).coff
+TARGET_OBJECTS = \
+  ne2000/8390.o \
+  ne2000/main.o
 
-OBJECTS = $(OBJECTS_CTE) $(OBJECTS_TDI) $(OBJECTS_MISC)
+OBJECTS_CTE = \
+  cte/string.o \
+  cte/stubs.o
 
-all: $(TARGETNAME).sys
+OBJECTS_MISC = \
+  misc/main.o
 
-misc/$(TARGETNAME).coff: misc/$(TARGETNAME).rc ../../../include/reactos/resource.h
+OBJECTS_TDI = \
+  tdi/dereg.o \
+  tdi/handler.o \
+  tdi/obsolete.o \
+  tdi/stubs.o
+  
+TARGET_OBJECTS = \
+  $(OBJECTS_CTE) \
+  $(OBJECTS_MISC) \
+  $(OBJECTS_TDI)
 
-CLEAN_FILES = \
-               cte/*.o tdi/*.o misc/*.o misc/*.coff \
-               $(TARGETNAME).o $(TARGETNAME).a \
-               junk.tmp base.tmp temp.exp \
-               $(TARGETNAME).sys $(TARGETNAME).sym
+TARGET_CLEAN = \
+  cte/*.o \
+  misc/*.o \
+  misc/*.coff \
+  tdi/*.o
 
-$(TARGETNAME).sys: $(OBJECTS) misc/$(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).sys \
-               --def misc/$(TARGETNAME).def \
-               --output-lib $(TARGETNAME).a \
-               --kill-at
-       $(CC) \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -e _DllMain@8 \
-               -o junk.tmp \
-               -Wl,--image-base,0x0 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $(TARGETNAME).o \
-               -specs=../../../specs \
-               ../../../ntoskrnl/ntoskrnl.a
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).sys \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def misc/$(TARGETNAME).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -e _DriverEntry@8 \
-               -o $(TARGETNAME).sys \
-               $(TARGETNAME).o \
-               ../../../ntoskrnl/ntoskrnl.a \
-               -Wl,--image-base,0x0 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,temp.exp \
-               -specs=../../../specs
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
+TARGET_PATH = misc
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
-
-dist: $(DIST_DIR)/drivers/$(TARGETNAME).sys
-
-$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys ../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
-
-#WITH_DEBUGGING = yes
-#WIN32_LEAN_AND_MEAN = yes
-#WARNINGS_ARE_ERRORS = yes
-include ../../../rules.mak
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
index de7970a..6582e69 100644 (file)
@@ -1,72 +1,19 @@
-# TDITEST.SYS - TDI test driver
-#
-PATH_TO_TOP = ../../..
-
-TARGETNAME=tditest
-
-CFLAGS = -D__NTDRIVER__ -I./include 
-
-RESOURCE_OBJECT = $(TARGETNAME).coff
-TDITEST_OBJECTS = tditest/tditest.o
-
-all: objects $(TARGETNAME).sys
-
-objects:
-       mkdir objects
-
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
+# $Id: makefile,v 1.8 2001/08/21 20:13:16 chorns Exp $
 
-OBJECTS = $(TDITEST_OBJECTS) $(RESOURCE_OBJECT) ../../../ntoskrnl/ntoskrnl.a
-
-
-CLEAN_FILES = *.o objects/*.o tditest/*.o $(TARGETNAME).coff $(TARGETNAME).o \
-              junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
-
-$(TARGETNAME).sys: $(OBJECTS)
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,--base-file,base.tmp \
-               -Wl,--defsym,_end=end  \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-        $(OBJECTS) \
-        -o junk.tmp
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-        --dllname $(TARGETNAME).sys \
-        --base-file base.tmp \
-        --output-exp temp.exp
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-        $(OBJECTS) \
-        -o $(TARGETNAME).sys
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
+PATH_TO_TOP = ../../..
 
-.PHONY: clean 
+TARGET_TYPE = driver
 
-install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
+TARGET_NAME = tditest
 
-$(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
+TARGET_CFLAGS = -I./include
 
-dist: $(DIST_DIR)/drivers/$(TARGETNAME).sys
+TARGET_OBJECTS = \
+  tditest/tditest.o
 
-$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys ../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
+TARGET_CLEAN = \
+  tditest/*.o
 
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index b617ed9..4b63f5a 100644 (file)
@@ -1,73 +1,19 @@
-# Makefile for ReactOS WinSock Helper DLL for TCP/IP
+# $Id: makefile,v 1.7 2001/08/21 20:13:16 chorns Exp $
 
 PATH_TO_TOP = ../../..
 
-CFLAGS = -D__NTDRIVER__ -I./ -DUNICODE
+TARGET_TYPE = dynlink
 
-TARGETNAME=wshtcpip
+TARGET_NAME = wshtcpip
 
-MAIN_OBJECTS = $(TARGETNAME).o
+TARGET_BASE = 0x777c0000
 
-RESOURCE_OBJECT = $(TARGETNAME).coff
+TARGET_CFLAGS = -DUNICODE
 
-OBJECTS = $(MAIN_OBJECTS) $(RESOURCE_OBJECT)
+TARGET_SDKLIBS = ntdll.a kernel32.a ws2_32.a
 
-LIBS = ../../../lib/ntdll/ntdll.a \
-       ../../../lib/kernel32/kernel32.a \
-       ../../../lib/ws2_32/ws2_32.a
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-CLEAN_FILES = $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-                 $(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
-
-all: $(TARGETNAME).dll
-
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
-
-$(TARGETNAME).dll: $(LIBS) $(OBJECTS) $(TARGETNAME).def
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               $(TARGETNAME).o \
-        $(LIBS) \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGETNAME).edf
-       - $(RM) base.tmp
-       $(CC) \
-               $(OBJECTS) $(LIBS) \
-               -mdll \
-               -o $(TARGETNAME).dll \
-               -Wl,--image-base,0x777C0000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
-
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
-
-$(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll ../../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
-
-include ../../../rules.mak
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
index 67983cc..00ec34f 100644 (file)
-# $Id: makefile,v 1.2 2001/07/26 12:35:52 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET=class2
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -I$(PATH_TO_TOP)/include
-
-all: $(TARGET).sys $(TARGET).sys.unstripped $(TARGET).a
-
-.phony: all
-
-clean:
-       - $(RM) *.o $(TARGET).a $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
+# $Id: makefile,v 1.3 2001/08/21 20:13:16 chorns Exp $
 
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
+TARGET_TYPE = export_driver
 
-$(TARGET).a: $(TARGET).def
-       $(DLLTOOL) \
-               --dllname $(TARGET).sys \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
+TARGET_NAME = class2
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8\
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@.unstripped \
-               $^
-       - $(RM) temp.exp
-       - $(NM) --numeric-sort $@.unstripped > $@.sym
-       $(STRIP) --strip-debug $<
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@ \
-               $^
-       - $(RM) temp.exp
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-WARNINGS_ARE_ERRORS = yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
index 101e02e..6f4d2e7 100644 (file)
@@ -1,41 +1,17 @@
-# $Id: makefile,v 1.1 2001/07/24 10:21:15 ekohl Exp $
-#
-# disk.sys makefile
-#
-PATH_TO_TOP = ../../..
-
-TARGET=disk
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a ../class2/class2.a
-
-CFLAGS = -D__NTDRIVER__ -I.
-
-all: $(TARGET).sys.unstripped $(TARGET).sys
+# $Id: makefile,v 1.2 2001/08/21 20:13:16 chorns Exp $
 
-.phony: all
-
-clean:
-       - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_TYPE = driver
 
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_NAME = disk
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
+TARGET_DDKLIBS = class2.a
 
-WITH_DEBUGGING=yes
-WARNINGS_ARE_ERRORS = yes
+TARGET_OBJECTS = $(TARGET_NAME).o
 
 include $(PATH_TO_TOP)/rules.mak
 
-#EOF
+include $(TOOLS_PATH)/helper.mk
+
+# EOF
index c69420f..c1d103e 100644 (file)
-# $Id: makefile,v 1.3 2001/07/26 12:36:33 ekohl Exp $
-#
-#
-PATH_TO_TOP = ../../..
-
-TARGET=scsiport
-
-OBJECTS = $(TARGET).o $(TARGET).coff
-
-LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
-CFLAGS = -D__NTDRIVER__ -I$(PATH_TO_TOP)/include
-
-all: $(TARGET).sys $(TARGET).sys.unstripped $(TARGET).a
-
-.phony: all
-
-clean:
-       - $(RM) *.o $(TARGET).a $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
+# $Id: makefile,v 1.4 2001/08/21 20:13:16 chorns Exp $
 
-.phony: clean
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-
-$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+PATH_TO_TOP = ../../..
 
+TARGET_TYPE = export_driver
 
-$(TARGET).a: $(TARGET).def
-       $(DLLTOOL) \
-               --dllname $(TARGET).sys \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
+TARGET_NAME = scsiport
 
-$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8\
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@.unstripped \
-               $^
-       - $(RM) temp.exp
-       - $(NM) --numeric-sort $@.unstripped > $@.sym
-       $(STRIP) --strip-debug $<
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@ \
-               $^
-       - $(RM) temp.exp
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-WARNINGS_ARE_ERRORS = yes
 include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
diff --git a/reactos/include/.cvsignore b/reactos/include/.cvsignore
new file mode 100644 (file)
index 0000000..48abe12
--- /dev/null
@@ -0,0 +1 @@
+roscfg.h
index 8516399..451ad31 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: halddk.h,v 1.9 2001/03/31 16:01:03 phreak Exp $
+/* $Id: halddk.h,v 1.10 2001/08/21 20:13:05 chorns Exp $
  *
  * COPYRIGHT:                See COPYING in the top level directory
  * PROJECT:                  ReactOS kernel
@@ -465,7 +465,8 @@ HalGetInterruptVector (
 VOID
 STDCALL
 HalInitializeProcessor (
-       ULONG   ProcessorNumber
+       ULONG   ProcessorNumber,
+  PVOID ProcessorStack
        );
 
 BOOLEAN
@@ -623,9 +624,11 @@ typedef struct _KD_PORT_INFORMATION
 } KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
 
 
-#if defined(__HAL__) || defined(__NTOSKRNL__)
+#if defined(__NTOSKRNL__)
 extern ULONG KdComPortInUse __declspec(dllexport);
-#else
+#endif
+
+#if defined(__HAL__)
 extern ULONG KdComPortInUse __declspec(dllimport);
 #endif
 
index fa6460c..6af0db7 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef __INCLUDE_DDK_KDFUNCS_H
 #define __INCLUDE_DDK_KDFUNCS_H
-/* $Id: kdfuncs.h,v 1.3 2000/03/04 21:58:49 ekohl Exp $ */
+/* $Id: kdfuncs.h,v 1.4 2001/08/21 20:13:05 chorns Exp $ */
 
 /* --- NTOSKRNL.EXE --- */
 #if defined(__NTOSKRNL__)
@@ -17,13 +17,6 @@ KdPollBreakIn (
        VOID
        );
 
-/* --- HAL.DLL --- */
-#if defined(__NTOSKRNL__)
-extern ULONG KdComPortInUse __declspec(dllexport);
-#else
-extern ULONG KdComPortInUse __declspec(dllimport);
-#endif
-
 BOOLEAN
 STDCALL
 KdPortInitialize (
index 09e1f9c..f339957 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: psfuncs.h,v 1.13 2001/04/21 12:38:28 ekohl Exp $
+/* $Id: psfuncs.h,v 1.14 2001/08/21 20:13:05 chorns Exp $
  */
 #ifndef _INCLUDE_DDK_PSFUNCS_H
 #define _INCLUDE_DDK_PSFUNCS_H
@@ -61,6 +61,8 @@ BOOLEAN STDCALL PsGetVersion (PULONG          MajorVersion    OPTIONAL,
                              PULONG            BuildNumber     OPTIONAL,
                              PUNICODE_STRING   CSDVersion      OPTIONAL);
 
+VOID STDCALL PsDispatchThread(ULONG NewThreadStatus);
+
 #endif
 
 /* EOF */
index 7a4c123..65fd558 100644 (file)
@@ -1,16 +1,14 @@
-# $Id: makefile,v 1.18 2001/07/15 21:18:54 rex Exp $
-#
-# Makefile for ReactOS advapi32.dll
-#
-PATH_TO_TOP = ../..
+# $Id: makefile,v 1.19 2001/08/21 20:13:05 chorns Exp $
 
-BASE_CFLAGS = -I../../include
+PATH_TO_TOP = ../..
 
-TARGETNAME=advapi32
+TARGET_TYPE = dynlink
 
-DLLTARGET=$(TARGETNAME).dll
+TARGET_NAME = advapi32
 
+TARGET_SDKLIBS = ntdll.a kernel32.a
 
+TARGET_BASE = 0x77dc0000
 
 MISC_OBJECTS=\
        misc/dllmain.o  \
@@ -35,84 +33,20 @@ TOKEN_OBJECTS=\
        token/privilege.o       \
        token/token.o
 
-RESOURCE_OBJECT=\
-       $(TARGETNAME).coff
-
-OBJECTS=\
-       $(MISC_OBJECTS)         \
-       $(REGISTRY_OBJECTS)     \
-       $(SECURITY_OBJECTS)     \
-       $(SERVICE_OBJECTS)      \
-       $(TOKEN_OBJECTS)        \
-       $(RESOURCE_OBJECT)
-
-CLEAN_FILES = misc/*.o reg/*.o sec/*.o service/*.o token/*.o \
-              $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-             $(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
-
-all: $(DLLTARGET)
-
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../include/reactos/resource.h
-
-$(TARGETNAME).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
-
-$(TARGETNAME).dll: $(DLLMAIN) $(OBJECTS) $(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               $(TARGETNAME).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGETNAME).edf
-       - $(RM) base.tmp
-       $(CC) \
-               $(TARGETNAME).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o $(TARGETNAME).dll \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--image-base,0x77dc0000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
-
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-
-
-dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
+TARGET_OBJECTS = \
+       $(MISC_OBJECTS) \
+       $(REGISTRY_OBJECTS) \
+       $(SECURITY_OBJECTS) \
+       $(SERVICE_OBJECTS) \
+       $(TOKEN_OBJECTS)
 
-$(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll ../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
+TARGET_CLEAN = \
+  misc/*.o \
+  reg/*.o \
+  sec/*.o \
+  service/*.o \
+  token/*.o
 
+include $(PATH_TO_TOP)/rules.mak
 
-include ../../rules.mak
+include $(TOOLS_PATH)/helper.mk
index db1804f..cd88254 100644 (file)
@@ -1,16 +1,31 @@
-# $Id: makefile,v 1.45 2001/07/15 21:18:54 rex Exp $
-#
-# ReactOS Operating System
-#
+# $Id: makefile,v 1.46 2001/08/21 20:13:05 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-TARGET=crtdll
-DLLTARGET=$(TARGET).dll
+TARGET_TYPE = dynlink
+
+TARGET_NAME = crtdll
+
+TARGET_LFLAGS = -nostartfiles
+
+TARGET_SDKLIBS = kernel32.a
+
+TARGET_BASE = 0x77630000
+
+TARGET_DEFONLY = yes
+
+TARGET_OBJECTS = $(TARGET_NAME).o
+
+TARGET_CLEAN = assert/*.o conio/*.o ctype/*.o direct/*.o dirent/*.o \
+       except/*.o float/*.o io/*.o libc/*.o locale/*.o malloc/*.o \
+       math/*.o mbstring/*.o misc/*.o process/*.o quad/*.o search/*.o \
+       setjmp/*.o stdio/*.o stdlib/*.o string/*.o sys_stat/*.o tchar/*.o \
+       time/*.o wchar/*.o signal/*.o
 
 
-CFLAGS = 
+include $(PATH_TO_TOP)/rules.mak
 
-all: $(DLLTARGET)
+include $(TOOLS_PATH)/helper.mk
 
 
 ASSERT_OBJECTS = assert/assert.o
@@ -49,7 +64,7 @@ MBSTRING_OBJECTS = mbstring/mbsnicmp.o mbstring/mbsnset.o mbstring/mbsnextc.o mb
                mbstring/ismbpun.o mbstring/mbslwr.o mbstring/mbsupr.o mbstring/mbstok.o
 
 STRING_OBJECTS = string/memchr.o string/memcmp.o string/strcat.o \
-                 string/strchr.o string/strcmp.o string/strcoll.o \
+     string/strchr.o string/strcmp.o string/strcoll.o \
                 string/strcpy.o string/strcspn.o string/memcpy.o \
                 string/strlen.o string/strncat.o string/strncmp.o \
                 string/strncpy.o string/strpbrk.o string/strrchr.o \
@@ -124,8 +139,6 @@ FLOAT_OBJECTS = float/fpreset.o float/clearfp.o float/cntrlfp.o float/statfp.o f
 SYS_STAT_OBJECTS = sys_stat/fstat.o sys_stat/stat.o sys_stat/futime.o sys_stat/ftime.o\
                sys_stat/systime.o
 
-
-
 MATH_OBJECTS = math/acos.o math/acosh.o math/asin.o math/asinh.o math/atan.o math/atan2.o\
                math/atanh.o math/ceil.o math/cos.o math/cosh.o math/exp.o math/fabs.o\
                math/floor.o math/fmod.o math/frexp.o math/huge_val.o math/hypot.o\
@@ -134,78 +147,14 @@ MATH_OBJECTS = math/acos.o math/acosh.o math/asin.o math/asinh.o math/atan.o mat
                math/tanh.o math/stubs.o math/j0_y0.o math/j1_y1.o math/jn_yn.o\
                math/cabs.o math/ftol.o
 
-RESOURCE_OBJECT = $(TARGET).coff
-
 OBJECTS = $(MISC_OBJECTS) $(STDLIB_OBJECTS) $(IO_OBJECTS) \
          $(FLOAT_OBJECTS) $(ASSERT_OBJECTS) $(PROCESS_OBJECTS) \
          $(STDIO_OBJECTS) $(CTYPE_OBJECTS) $(MATH_OBJECTS) \
          $(STRING_OBJECTS) $(TIME_OBJECTS) $(WCHAR_OBJECTS) \
          $(SYS_STAT_OBJECTS) $(MALLOC_OBJECTS) $(MBSTRING_OBJECTS)\
          $(SEARCH_OBJECTS) $(CONIO_OBJECTS) $(DIRECT_OBJECTS) \
-         $(SIGNAL_OBJECTS) $(SETJMP_OBJECTS) $(RESOURCE_OBJECT) \
-         $(LOCALE_OBJECTS) $(EXCEPT_OBJECTS) $(TCHAR_OBJECTS)
-
-CLEAN_FILES = assert/*.o conio/*.o ctype/*.o direct/*.o dirent/*.o \
-       except/*.o float/*.o io/*.o libc/*.o locale/*.o malloc/*.o \
-       math/*.o mbstring/*.o misc/*.o process/*.o quad/*.o search/*.o \
-       setjmp/*.o stdio/*.o stdlib/*.o string/*.o sys_stat/*.o tchar/*.o \
-       time/*.o wchar/*.o $(TARGET).a $(TARGET).o $(TARGET).dll $(TARGET).sym \
-       $(TARGET).coff $(SIGNAL_OBJECTS)
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).a: $(OBJECTS)
-       $(LD)  -r $(OBJECTS) -o $(TARGET).a
-
-$(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --output-lib $(TARGET).a
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp \
-               -Wl,--entry=_DllMain@12 \
-               $(TARGET).o \
-               ../kernel32/kernel32.a -lgcc
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).def
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o $(TARGET).dll \
-               $(TARGET).o  \
-               ../kernel32/kernel32.a -lgcc \
-               -Wl,--image-base,0x77630000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp \
-               -Wl,--entry=_DllMain@12
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
-
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
-
-include ../../rules.mak
+         $(SIGNAL_OBJECTS) $(SETJMP_OBJECTS) $(LOCALE_OBJECTS) \
+         $(EXCEPT_OBJECTS) $(TCHAR_OBJECTS)
 
+$(TARGET_NAME).o: $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
index e195f23..1052db4 100644 (file)
@@ -1,86 +1,30 @@
-# $Id: makefile,v 1.13 2001/07/15 21:18:54 rex Exp $
-#
-# Makefile for fmifs.dll
-#
+# $Id: makefile,v 1.14 2001/08/21 20:13:06 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-TARGET=fmifs
-DLLTARGET=$(TARGET).dll
+TARGET_TYPE = dynlink
 
+TARGET_NAME = fmifs
 
-BASE_CFLAGS = -I../../include
+TARGET_BASE = 0x76df0000
 
-all: $(DLLTARGET)
+TARGET_SDKLIBS = ntdll.a kernel32.a
 
-IFS_OBJECTS = chkdsk.o compress.o diskcopy.o extend.o \
-       format.o init.o label.o media.o 
+TARGET_OBJECTS = \
+  chkdsk.o \
+  compress.o \
+  diskcopy.o \
+  dllmain.o \
+  extend.o \
+       format.o \
+       init.o \
+       label.o \
+       media.o 
        
-MISC_OBJECTS = dllmain.o $(TARGET).coff
-
-OBJECTS = $(IFS_OBJECTS) $(MISC_OBJECTS)
-
-CLEAN_FILES = *.o *.a *.tmp *.dll *.sym *.coff
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).a: $(OBJECTS)
-       $(AR) csr $(TARGET).a $(OBJECTS)
-
-$(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
-       $(CC) \
-               $(TARGET).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) \
-               $(TARGET).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o $(TARGET).dll \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--image-base,0x76df0000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
+include $(PATH_TO_TOP)/rules.mak
 
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+TARGET_FILES = misc/*.o
 
 # EOF
index 3ac4068..cfb9fb2 100644 (file)
@@ -1,83 +1,32 @@
-# $Id: makefile,v 1.18 2001/07/15 21:18:54 rex Exp $
-#
-# Makefile for ReactOS gdi32.dll
-#
-PATH_TO_TOP = ../..
-
-TARGET=gdi32
-
-BASE_CFLAGS = -I../../include
+# $Id: makefile,v 1.19 2001/08/21 20:13:06 chorns Exp $
 
-DLLTARGET=$(TARGET).dll
-
-
-all: $(DLLTARGET)
+PATH_TO_TOP = ../..
 
-MAIN_OBJECTS = main/dllmain.o
-MISC_OBJECTS = misc/stubs.o misc/stubsa.o misc/stubsw.o misc/win32k.o
-RESOURCE_OBJECTS = $(TARGET).coff
-OBJECTS_OBJECTS = objects/dc.o objects/line.o objects/pen.o objects/bitblt.o objects/text.o
+TARGET_TYPE = dynlink
 
-OBJECTS = $(MAIN_OBJECTS) $(MISC_OBJECTS) $(RESOURCE_OBJECTS) $(OBJECTS_OBJECTS)
+TARGET_NAME = gdi32
 
-$(TARGET).a: $(OBJECTS)
-       $(AR) csr $(TARGET).a $(OBJECTS)
+TARGET_BASE = 0x77ed0000
 
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
+TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
-$(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
-       $(CC) $(TARGET).o \
-               ../kernel32/kernel32.a \
-               ../ntdll/ntdll.a \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry,_DllMain@12 \
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) $(TARGET).o \
-               ../kernel32/kernel32.a \
-               ../ntdll/ntdll.a \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -o $(TARGET).dll \
-               -Wl,--entry,_DllMain@12 \
-               -Wl,--image-base,0x77ed0000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-CLEAN_FILES = *.a *.o *.coff *.sym *.tmp *.dll main/*.o misc/*.o objects/*.o
+TARGET_CLEAN = main/*.o misc/*.o objects/*.o
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+include $(PATH_TO_TOP)/rules.mak
 
-.PHONY: clean 
+include $(TOOLS_PATH)/helper.mk
 
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
+MAIN_OBJECTS = main/dllmain.o
 
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
+MISC_OBJECTS = misc/stubs.o misc/stubsa.o misc/stubsw.o misc/win32k.o
 
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
+OBJECTS_OBJECTS = objects/dc.o objects/line.o objects/pen.o objects/bitblt.o objects/text.o
 
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
+OBJECTS = $(MAIN_OBJECTS) $(MISC_OBJECTS) $(OBJECTS_OBJECTS)
 
-include ../../rules.mak
+$(TARGET_NAME).o: $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
 
 # EOF
index f7d6ad3..501e052 100644 (file)
@@ -1,18 +1,31 @@
-# $Id: makefile,v 1.49 2001/08/02 20:25:16 phreak Exp $
-#
-# ReactOS Operating System
-#
+# $Id: makefile,v 1.50 2001/08/21 20:13:06 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-TARGET = kernel32
+TARGET_TYPE = dynlink
+
+TARGET_NAME = kernel32
+
+TARGET_BASE = 0x77f00000
+
+TARGET_CFLAGS = -DKERNEL32_BASE=$(TARGET_DLLBASE)
+
+TARGET_LFLAGS = -nostartfiles
+
+TARGET_SDKLIBS = ntdll.a
 
-KERNEL32_BASE = 0x77f00000
+TARGET_GCCLIBS = gcc
 
-CFLAGS := -DKERNEL32_BASE=$(KERNEL32_BASE) -g
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-DLLTARGET=$(TARGET).dll
+TARGET_CLEAN = except/*.o file/*.o mem/*.o misc/*.o nls/*.o \
+             process/*.o string/*.o synch/*.o thread/*.o
+
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
 
-all: $(DLLTARGET)
 
 SYNCH_OBJECTS = synch/critical.o synch/event.o synch/intrlck.o synch/mutex.o \
                 synch/sem.o synch/timer.o synch/wait.o
@@ -67,80 +80,12 @@ STRING_OBJECTS = string/lstring.o
 
 EXCEPT_OBJECTS = except/except.o
 
-RESOURCE_OBJECT = $(TARGET).coff
-
-
 OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
           $(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
-          $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS) $(RESOURCE_OBJECT)
-
-CLEAN_FILES = except/*.o file/*.o mem/*.o misc/*.o nls/*.o  \
-              process/*.o string/*.o synch/*.o thread/*.o  \
-              $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp \
-             $(TARGET).dll $(TARGET).sym $(TARGET).coff
-
-nls/ole2nls.o: nls/ole2nls.c
-       $(CC) $(CFLAGS) -I. nls/ole2nls.c
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).a: $(OBJECTS)
-       $(AR) csr $(TARGET).a $(OBJECTS)
-
-$(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-       $(LD) \
-               -r $(OBJECTS) \
-               -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp \
-               $(TARGET).o \
-               ../ntdll/ntdll.a -lgcc
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o $(TARGET).dll \
-               $(TARGET).o \
-               ../ntdll/ntdll.a -lgcc \
-               -Wl,--image-base,$(KERNEL32_BASE) \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
-
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
-
-WITH_DEBUGGING=yes
-#WARNINGS_ARE_ERRORS = yes
-include ../../rules.mak
+          $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS)
+
+$(TARGET_NAME).o: $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
 
 %/TAGS:
        etags -o $(@D)/TAGS $(@D)/\*.c
index 43f3632..c46f1c9 100644 (file)
@@ -1,87 +1,34 @@
-# Makefile for ReactOS Ancillary Function Driver DLL
+# $Id: makefile,v 1.5 2001/08/21 20:13:06 chorns Exp $
 
 PATH_TO_TOP = ../..
 
-CFLAGS = -I./include -DUNICODE -DDBG
-
-TARGETNAME=msafd
-
-MISC_OBJECTS = misc/dllmain.o misc/event.o misc/helpers.o \
-               misc/sndrcv.o misc/stubs.o
-
-RESOURCE_OBJECT = $(TARGETNAME).coff
-
-OBJECTS = $(MISC_OBJECTS) $(RESOURCE_OBJECT)
-
-LIBS = ../ntdll/ntdll.a \
-       ../kernel32/kernel32.a
-
-CLEAN_FILES = misc/*.o \
-              $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-                 $(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
-
-all: $(TARGETNAME).dll
-
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../include/reactos/resource.h
-
-$(TARGETNAME).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
-
-$(TARGETNAME).dll: $(LIBS) $(OBJECTS) $(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               $(TARGETNAME).o \
-        $(LIBS) \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGETNAME).edf
-       - $(RM) base.tmp
-       $(CC) \
-               $(TARGETNAME).o \
-        $(LIBS) \
-               -mdll \
-               -o $(TARGETNAME).dll \
-               -Wl,--image-base,0x777A0000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
-
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-ifeq ($(DOSCLI),yes)
-       $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)\dlls\$(TARGETNAME).dll
-else
-       $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-endif
-
-dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
-
-$(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-ifeq ($(DOSCLI),yes)
-       $(CP) $(TARGETNAME).dll ..\..\$(DIST_DIR)\dlls\$(TARGETNAME).dll
-else
-       $(CP) $(TARGETNAME).dll ../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
-endif
-
-include ../../rules.mak
+TARGET_TYPE = dynlink
 
+TARGET_NAME = msafd
+
+TARGET_BASE = 0x777a0000
+
+TARGET_SDKLIBS = ntdll.a kernel32.a
+
+TARGET_CFLAGS = -I./include -DUNICODE -DDBG
+
+TARGET_OBJECTS = $(TARGET_NAME).o 
+
+TARGET_CLEAN = misc/*.o
+
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+
+MISC_OBJECTS = \
+  misc/dllmain.o misc/event.o misc/helpers.o \
+  misc/sndrcv.o misc/stubs.o
+
+OBJECTS = $(MISC_OBJECTS)
+
+$(TARGET_NAME).o: $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
+
+# EOF
index 57cede8..55d6dfa 100644 (file)
@@ -1,15 +1,35 @@
-# $Id: Makefile,v 1.19 2001/07/18 09:23:02 ekohl Exp $
-#
-# ReactOS Operating System
-#
+# $Id: Makefile,v 1.20 2001/08/21 20:13:06 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-TARGET_NAME=msvcrt
-TARGET_DLL=$(TARGET_NAME).dll
+TARGET_DEFONLY = yes
+
+TARGET_TYPE = dynlink
+
+TARGET_NAME = msvcrt
+
+TARGET_LFLAGS = -nostartfiles
+
+TARGET_SDKLIBS = kernel32.a
+
+TARGET_GCCLIBS = gcc
+
+TARGET_BASE = 0x78000000
+
+TARGET_CFLAGS = -D__MSVCRT__
+
+TARGET_OBJECTS = $(TARGET_NAME).o
+
+TARGET_CLEAN = \
+  conio/*.o ctype/*.o direct/*.o except/*.o float/*.o io/*.o \
+       locale/*.o math/*.o mbstring/*.o misc/*.o process/*.o search/*.o \
+       setjmp/*.o signal/*.o stdio/*.o stdlib/*.o string/*.o sys_stat/*.o \
+       time/*.o wstring/*.o
 
-CFLAGS = -I../../include -D__MSVCRT__
 
-all: $(TARGET_DLL)
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
 
 
 OBJECTS_CONIO = \
@@ -435,69 +455,9 @@ OBJECTS = \
        $(OBJECTS_STRING) \
        $(OBJECTS_SYS_STAT) \
        $(OBJECTS_TIME) \
-       $(OBJECTS_WSTRING) \
-       msvcrt.coff
-
-CLEAN_FILES = conio/*.o ctype/*.o direct/*.o except/*.o float/*.o io/*.o \
-       locale/*.o math/*.o mbstring/*.o misc/*.o process/*.o search/*.o \
-       setjmp/*.o signal/*.o stdio/*.o stdlib/*.o string/*.o sys_stat/*.o \
-       time/*.o wstring/*.o $(TARGET_NAME).a $(TARGET_NAME).coff \
-       $(TARGET_NAME).o $(TARGET_NAME).dll $(TARGET_NAME).sym
-
-$(TARGET_NAME).coff: $(TARGET_NAME).rc ../../include/reactos/resource.h
-
-$(TARGET_NAME).a: $(OBJECTS)
-       $(LD)  -r $(OBJECTS) -o $(TARGET_NAME).a
+       $(OBJECTS_WSTRING)
 
-$(TARGET_NAME).dll: $(DLLMAIN) $(OBJECTS) $(TARGET_NAME).def
+$(TARGET_NAME).o: $(OBJECTS)
        $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGET_NAME).dll \
-               --def $(TARGET_NAME).def \
-               --output-lib $(TARGET_NAME).a
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp \
-               -Wl,--entry=_DllMain@12 \
-               $(TARGET_NAME).o \
-               ../kernel32/kernel32.a -lgcc
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET_NAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET_NAME).def
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o $(TARGET_NAME).dll \
-               $(TARGET_NAME).o  \
-               ../kernel32/kernel32.a -lgcc \
-               -Wl,--image-base,0x78000000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp \
-               -Wl,--entry=_DllMain@12
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET_NAME).dll > $(TARGET_NAME).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.phony: clean
-
-install: $(FLOPPY_DIR)/dlls/$(TARGET_NAME).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGET_NAME).dll: $(TARGET_NAME).dll
-       $(CP) $(TARGET_NAME).dll $(FLOPPY_DIR)/dlls/$(TARGET_NAME).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGET_NAME).dll
-
-$(DIST_DIR)/dlls/$(TARGET_NAME).dll: $(TARGET_NAME).dll
-       $(CP) $(TARGET_NAME).dll ../../$(DIST_DIR)/dlls/$(TARGET_NAME).dll
-
-include ../../rules.mak
 
+# EOF
index 75408b1..ddde6d6 100644 (file)
@@ -1,19 +1,23 @@
-# $Id: makefile,v 1.64 2001/08/02 20:25:17 phreak Exp $
-#
-# ReactOS Operating System
-#
+# $Id: makefile,v 1.65 2001/08/21 20:13:06 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-TARGET = ntdll
+TARGET_TYPE = dynlink
+
+TARGET_NAME = ntdll
+
+TARGET_CFLAGS = -D__NTDLL__
 
-CFLAGS = -D__NTDLL__ -g
+TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \
+  -Wl,--section-alignment,0x1000
 
-IMAGE_BASE = 0x77f60000
+TARGET_GCCLIBS = gcc
 
-DLLTARGET=$(TARGET).dll
-DLLMAIN=main/dllmain.o
+TARGET_BASE = 0x77f60000
 
-all: $(DLLTARGET)
+TARGET_PATH = def
+
+TARGET_ENTRY = _LdrInitializeThunk@16
 
 CSR_OBJECTS = csr/lpc.o csr/capture.o csr/probe.o csr/thread.o
 
@@ -26,7 +30,7 @@ RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
               rtl/access.o rtl/apc.o rtl/callback.o rtl/luid.o rtl/misc.o \
               rtl/registry.o rtl/exception.o rtl/intrlck.o rtl/resource.o \
               rtl/handle.o rtl/atom.o rtl/message.o rtl/timezone.o \
-             rtl/propvar.o
+             rtl/propvar.o
 
 STDIO_OBJECTS = stdio/sprintf.o stdio/swprintf.o
 
@@ -46,75 +50,24 @@ STRING_OBJECTS = string/ctype.o string/memccpy.o string/memchr.o \
                  string/strpbrk.o string/strrchr.o string/strspn.o \
                  string/strstr.o string/strupr.o string/wstring.o
 
-OBJECTS = napi.o ldr/startup.o $(DBG_OBJECTS) $(RTL_OBJECTS) \
-          $(STDIO_OBJECTS) $(STDLIB_OBJECTS) $(STRING_OBJECTS) \
-          stubs/stubs.o ldr/utils.o $(CSR_OBJECTS) $(TARGET).coff
-
-CLEAN_FILES = napi.o ldr/*.o rtl/*.o stdio/*.o stdlib/*.o string/*.o stubs/*.o csr/*.o dbg/*.o \
-              $(TARGET).a main/dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
-              base.tmp temp.exp $(TARGET).sym $(TARGET).coff
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).a: $(OBJECTS)
-       $(AR) csr $(TARGET).a $(OBJECTS)
-
-$(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
-       $(LD) \
-               -r $(DLLMAIN) \
-               $(OBJECTS) \
-               -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def def/$(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp \
-               $(TARGET).o -lgcc
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def def/$(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               -mdll \
-               -o $(TARGET).dll \
-               $(TARGET).o -lgcc \
-               -Wl,--entry=_LdrInitializeThunk@16 \
-               -Wl,--image-base,$(IMAGE_BASE) \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
-
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
-
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
-
-include ../../rules.mak
+TARGET_OBJECTS = \
+  napi.o \
+  ldr/startup.o \
+  $(DBG_OBJECTS) \
+  $(RTL_OBJECTS) \
+  $(STDIO_OBJECTS) \
+  $(STDLIB_OBJECTS) \
+  $(STRING_OBJECTS) \
+  stubs/stubs.o \
+  ldr/utils.o \
+  $(CSR_OBJECTS)
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
 
 %/TAGS:
        etags -o $(@D)/TAGS $(@D)/\*.c
 
 etags: csr/TAGS dbg/TAGS ldr/TAGS main/TAGS rtl/TAGS stdio/TAGS stdlib/TAGS string/TAGS stubs/TAGS
-       etags -i csr/TAGS -i dbg/TAGS -i ldr/TAGS -i main/TAGS -i rtl/TAGS -i stdio/TAGS -i stdlib/TAGS -i string/TAGS -i stubs/TAGS
\ No newline at end of file
+       etags -i csr/TAGS -i dbg/TAGS -i ldr/TAGS -i main/TAGS -i rtl/TAGS -i stdio/TAGS -i stdlib/TAGS -i string/TAGS -i stubs/TAGS>>>>>>> 1.64
index ef2eb43..d4c3af8 100644 (file)
@@ -1,83 +1,33 @@
-# $Id: makefile,v 1.4 2001/07/21 15:40:04 ea Exp $
+# $Id: makefile,v 1.5 2001/08/21 20:13:07 chorns Exp $
 #
-# ReactOS 0.17
 # Jurgen Van Gael [jurgen.vangael@student.kuleuven.ac.be]
 #
 # Makefile for ReactOS ole32.dll
 #
+
 PATH_TO_TOP = ../..
 
-CFLAGS = -fno-rtti -I$(PATH_TO_TOP)/include/
+TARGET_TYPE = dynlink
+
+TARGET_NAME = ole32
 
-TARGETNAME=ole32
+TARGET_BASE = 0x77a50000
 
-DLLTARGET=$(TARGETNAME).dll
+TARGET_CFLAGS = -fno-rtti
 
+TARGET_SDKLIBS = kernel32.a
 
-OBJECTS=\
+TARGET_OBJECTS = \
        DllMain.o \
        CoXxx.o \
        Moniker.o \
        Ole2.o \
        OleAuto.o \
        Misc.o \
-       Storage.o \
-       $(TARGETNAME).coff
-
-
-CLEAN_FILES = *.o \
-              $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-             $(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
-
-all: $(DLLTARGET)
-
-$(TARGETNAME).coff: $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
+       Storage.o
 
-$(TARGETNAME).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
-
-$(TARGETNAME).dll: $(DLLMAIN) $(OBJECTS) $(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               $(TARGETNAME).o \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGETNAME).def
-       - $(RM) base.tmp
-       $(CC) \
-               $(TARGETNAME).o \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o $(TARGETNAME).dll \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--image-base,0x77A50000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
-
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
+include $(PATH_TO_TOP)/rules.mak
 
-.PHONY: clean 
+include $(TOOLS_PATH)/helper.mk
 
-include $(PATH_TO_TOP)/rules.mak
+# EOF
index 24db173..13bc925 100644 (file)
@@ -1,85 +1,21 @@
-# $Id: makefile,v 1.2 2001/07/21 15:34:08 ea Exp $
-#
-# Makefile for ReactOS oleaut32.dll
-#
-PATH_TO_TOP = ../..
-
-BASE_CFLAGS = -I../../include
-
-TARGETNAME=oleaut32
-
-IMAGE_BASE = 0x76260000
-
-DLLTARGET=$(TARGETNAME).dll
-OBJECTS = dllmain.o stubs.o $(TARGETNAME).coff
-CLEAN_FILES = $(OBJECTS) $(TARGETNAME).o $(TARGETNAME).a junk.tmp  \
-       base.tmp temp.exp $(TARGETNAME).dll $(TARGETNAME).sym  \
-       $(TARGETNAME).coff
-
-all: $(DLLTARGET)
+# $Id: makefile,v 1.3 2001/08/21 20:13:07 chorns Exp $
 
-$(TARGETNAME).coff: $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
-
-$(TARGETNAME).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
-
-$(TARGETNAME).dll: $(OBJECTS) $(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               $(TARGETNAME).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGETNAME).def
-       - $(RM) base.tmp
-       $(CC) \
-               $(TARGETNAME).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o $(TARGETNAME).dll \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--image-base,$(IMAGE_BASE) \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
-
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
+PATH_TO_TOP = ../..
 
-.PHONY: clean 
+TARGET_DEFONLY = yes
 
-install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
+TARGET_TYPE = dynlink
 
-$(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
+TARGET_NAME = oleaut32
 
+TARGET_BASE = 0x76260000
 
-dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
+TARGET_SDKLIBS = ntdll.a kernel32.a
 
-$(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll ../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
+TARGET_OBJECTS = dllmain.o stubs.o
 
+include $(PATH_TO_TOP)/rules.mak
 
-include ../../rules.mak
+include $(TOOLS_PATH)/helper.mk
 
+# EOF
index cbb682c..0687f1a 100644 (file)
@@ -1,78 +1,22 @@
-# $Id: Makefile,v 1.6 2001/07/15 21:18:55 rex Exp $
-#
-# ReactOS Operating System
-#
-PATH_TO_TOP = ../..
-
-CFLAGS = -Iinclude -D__SECUR32__ -DDBG -g -Wall -Werror
-
-TARGET = secur32
-
-SECUR32_BASE = 0x10000000
-
-DLLTARGET=$(TARGET).dll
-
-all: $(DLLTARGET)
+# $Id: Makefile,v 1.7 2001/08/21 20:13:07 chorns Exp $
 
-OBJECTS = lsa.o dllmain.o $(TARGET).coff
 
-CLEAN_FILES = $(OBJECTS) \
-             $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp \
-             $(TARGET).dll $(TARGET).sym
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).a: $(OBJECTS)
-       $(AR) csr $(TARGET).a $(OBJECTS)
-
-$(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-       $(LD) \
-               -r $(OBJECTS) \
-               -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
-       $(CC) \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp \
-               $(TARGET).o \
-               ../ntdll/ntdll.a
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) \
-               -mdll \
-               -o $(TARGET).dll \
-               $(TARGET).o \
-               ../ntdll/ntdll.a \
-               -Wl,--image-base,$(SECUR32_BASE) \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
+PATH_TO_TOP = ../..
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_TYPE = dynlink
 
-.PHONY: clean 
+TARGET_NAME = secur32
 
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
+TARGET_BASE = 0x10000000
 
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
+TARGET_SDKLIBS = ntdll.a
 
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
+TARGET_CFLAGS = -I./include -D__SECUR32__
 
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
+TARGET_OBJECTS = lsa.o dllmain.o
 
 include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
+
+# EOF
index c36a89b..a358f84 100644 (file)
@@ -1,93 +1,33 @@
-# $Id: makefile,v 1.4 2001/07/21 08:36:33 ea Exp $
-#
-# Makefile for ReactOS shell32.dll
-#
-PATH_TO_TOP = ../..
-
-BASE_CFLAGS = -I../../include
-
-TARGETNAME=shell32
-
-IMAGE_BASE = 0x77260000
-
-DLLTARGET=$(TARGETNAME).dll
-
-MISC_OBJECTS=\
-       misc/dllmain.o  \
-       misc/stubs.o 
-
-OBJECTS=\
-       $(MISC_OBJECTS) \
-       $(TARGETNAME).coff
-
-CLEAN_FILES = misc/*.o  \
-              $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-             $(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
+# $Id: makefile,v 1.5 2001/08/21 20:13:07 chorns Exp $
 
-all: $(DLLTARGET)
-
-$(TARGETNAME).coff: $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
+PATH_TO_TOP = ../..
 
-$(TARGETNAME).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
+TARGET_DEFONLY = yes
 
-$(TARGETNAME).dll: $(DLLMAIN) $(OBJECTS) $(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               $(TARGETNAME).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGETNAME).def
-       - $(RM) base.tmp
-       $(CC) \
-               $(TARGETNAME).o \
-               ../ntdll/ntdll.a \
-               ../kernel32/kernel32.a \
-               -nostartfiles \
-               -nostdlib \
-               -mdll \
-               -o $(TARGETNAME).dll \
-               -Wl,--entry=_DllMain@12\
-               -Wl,--image-base,$(IMAGE_BASE) \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
+TARGET_TYPE = dynlink
 
+TARGET_NAME = shell32
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_BASE = 0x77260000
 
-.PHONY: clean 
+TARGET_SDKLIBS = ntdll.a kernel32.a
 
-install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-$(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
+TARGET_CLEAN = misc/*.o
 
+include $(PATH_TO_TOP)/rules.mak
 
-dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
+include $(TOOLS_PATH)/helper.mk
 
-$(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll ../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
+MISC_OBJECTS = \
+       misc/dllmain.o \
+       misc/stubs.o 
 
+OBJECTS = \
+  $(MISC_OBJECTS)
 
-include ../../rules.mak
+$(TARGET_NAME).o: $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
 
+# EOF
index 85e7cb3..4f901f2 100644 (file)
@@ -1,14 +1,24 @@
-# $Id: makefile_rex,v 1.19 2001/07/15 21:18:56 rex Exp $
-#
-# ReactOS Operating System
-#
-# Makefile for user32.dll
-#
+# $Id: makefile_rex,v 1.20 2001/08/21 20:13:07 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-CFLAGS = -I./include -DUNICODE -DDBG
+TARGET_TYPE = dynlink
+
+TARGET_NAME = user32
+
+TARGET_BASE = 0x77e70000
+
+TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a
+
+TARGET_CFLAGS = -I./include -DUNICODE -DDBG
+
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-TARGET=user32
+TARGET_CLEAN = misc/*.o windows/*.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
 
 MISC_OBJECTS = \
   misc/desktop.o  \
@@ -24,74 +34,11 @@ WINDOWS_OBJECTS = \
        windows/message.o  \
        windows/window.o
 
-RESOURCE_OBJECT = $(TARGET).coff
-
-OBJECTS = $(MISC_OBJECTS) $(WINDOWS_OBJECTS) \
-          $(RESOURCE_OBJECT)
-
-LIBS = ../ntdll/ntdll.a \
-       ../kernel32/kernel32.a \
-       ../gdi32/gdi32.a
-
-CLEAN_FILES = misc/*.o windows/*.o internal/*.o controls/*.o graphics/*.o resources/*.o \
-              $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp $(TARGET).dll $(TARGET).sym
-
-all: $(TARGET).dll
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
-
-$(TARGET).dll: $(LIBS) $(OBJECTS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --output-lib $(TARGET).a \
-               --kill-at
-       $(CC) $(TARGET).o \
-         $(LIBS) \
-         -e _DllMain@12 \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-    --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) $(TARGET).o \
-         $(LIBS) \
-               -o $(TARGET).dll \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -e _DllMain@12 \
-               -Wl,--image-base,0x77e70000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
-
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
+OBJECTS = \
+  $(MISC_OBJECTS) \
+  $(WINDOWS_OBJECTS)
 
-include ../../rules.mak
+$(TARGET_NAME).o: $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
 
 # EOF
diff --git a/reactos/lib/user32/user32_specs b/reactos/lib/user32/user32_specs
deleted file mode 100644 (file)
index e5c1a5f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-*asm:
-
-
-*asm_final:
-
-
-*cpp:
--remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}
-
-*cc1:
-%(cc1_spec) 
-
-*cc1plus:
-
-
-*endfile:
-
-
-*link:
-%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMainCRTStartup@12}
-
-*lib:
-
-
-*libgcc:
--lgcc
-
-*startfile:
-
-
-*switches_need_spaces:
-
-
-*signed_char:
-%{funsigned-char:-D__CHAR_UNSIGNED__}
-
-*predefines:
--Di386 -D_WIN32 -DWIN32 -D__WIN32__   -D__MINGW32__ -DWINNT  -D_X86_=1 -D__STDC__=1  -D__stdcall=__attribute__((__stdcall__))  -D_stdcall=__attribute__((__stdcall__))   -D__cdecl=__attribute__((__cdecl__))   -D__declspec(x)=__attribute__((x))   -Asystem(winnt) -Acpu(i386) -Amachine(i386)
-
-*cross_compile:
-1
-
-*version:
-egcs-2.91.57
-
-*multilib:
-. ;
-
-*multilib_defaults:
-
-
-*multilib_extra:
-
-
-*multilib_matches:
-
-
-*linker:
-collect2
-
-*cpp_486:
-%{!ansi:-Di486} -D__i486 -D__i486__
-
-*cpp_586:
-%{!ansi:-Di586 -Dpentium}      -D__i586 -D__i586__ -D__pentium -D__pentium__
-
-*cpp_686:
-%{!ansi:-Di686 -Dpentiumpro}   -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
-
-*cpp_cpu_default:
-%(cpp_586)
-
-*cpp_cpu:
--Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
-
-*cc1_cpu:
-%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
-
index 8c702a4..8e03c5a 100644 (file)
@@ -1,79 +1,21 @@
-# $Id: makefile,v 1.7 2001/07/15 21:18:56 rex Exp $
-#
-# Makefile for ReactOS version.dll
-#
-PATH_TO_TOP = ../..
-
-TARGET=version
-
-BASE_CFLAGS = -I../../include
-
-DLLTARGET=$(TARGET).dll
-
-all: $(DLLTARGET)
-
-MISC_OBJECTS = misc/libmain.o misc/stubs.o
+# $Id: makefile,v 1.8 2001/08/21 20:13:08 chorns Exp $
 
-RESOURCE_OBJECTS = $(TARGET).coff
-
-OBJECTS = $(MISC_OBJECTS) $(RESOURCE_OBJECTS)
-
-$(TARGET).a: $(OBJECTS)
-       $(AR) csr $(TARGET).a $(OBJECTS)
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --kill-at \
-               --output-lib $(TARGET).a
-       $(CC) $(TARGET).o \
-               ../kernel32/kernel32.a \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--entry,_DllMain@12 \
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) $(TARGET).o \
-               ../kernel32/kernel32.a \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -o $(TARGET).dll \
-               -Wl,--entry,_DllMain@12 \
-               -Wl,--image-base,0x77a90000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
+PATH_TO_TOP = ../..
 
-CLEAN_FILES = *.o *.a *.coff *.sym *.tmp *.dll main/*.o misc/*.o
+TARGET_TYPE = dynlink
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_NAME = version
 
-.PHONY: clean 
+TARGET_BASE = 0x77a90000
 
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
+TARGET_SDKLIBS = kernel32.a
 
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
+TARGET_OBJECTS =  misc/libmain.o misc/stubs.o
 
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
+TARGET_CLEAN = misc/*.o
 
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
+include $(PATH_TO_TOP)/rules.mak
 
-include ../../rules.mak
+include $(TOOLS_PATH)/helper.mk
 
 # EOF
index 2683f50..bdbbfbd 100644 (file)
@@ -1,81 +1,26 @@
-# Makefile for ReactOS WinSock 2 DLL
+# $Id: makefile,v 1.7 2001/08/21 20:13:08 chorns Exp $
 
 PATH_TO_TOP = ../..
 
-CFLAGS = -Iinclude -DUNICODE -DDBG -DLE
+TARGET_TYPE = dynlink
 
-TARGETNAME=ws2_32
+TARGET_NAME = ws2_32
 
-MISC_OBJECTS = misc/bsd.o misc/catalog.o misc/dllmain.o \
-               misc/event.o misc/handle.o misc/ns.o \
-               misc/sndrcv.o misc/stubs.o misc/upcall.o
+TARGET_BASE = 0x77780000
 
-RESOURCE_OBJECT = $(TARGETNAME).coff
+TARGET_CFLAGS = -I./include -DUNICODE -DLE -DDBG
 
-OBJECTS = $(MISC_OBJECTS) $(RESOURCE_OBJECT)
+TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
-LIBS = ../ntdll/ntdll.a \
-       ../kernel32/kernel32.a \
-       ../advapi32/advapi32.a
+TARGET_OBJECTS = \
+  misc/bsd.o misc/catalog.o misc/dllmain.o \
+  misc/event.o misc/handle.o misc/ns.o \
+  misc/sndrcv.o misc/stubs.o misc/upcall.o
 
-CLEAN_FILES = misc/*.o \
-              $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
-                 $(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
+include $(PATH_TO_TOP)/rules.mak
 
-all: $(TARGETNAME).dll
+include $(TOOLS_PATH)/helper.mk
 
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../include/reactos/resource.h
-
-$(TARGETNAME).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
-
-$(TARGETNAME).dll: $(LIBS) $(OBJECTS) $(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --def $(TARGETNAME).def \
-               --kill-at \
-               --output-lib $(TARGETNAME).a
-       $(CC) \
-               $(TARGETNAME).o \
-        $(LIBS) \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGETNAME).dll \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGETNAME).edf
-       - $(RM) base.tmp
-       $(CC) \
-               $(TARGETNAME).o \
-        $(LIBS) \
-               -mdll \
-               -o $(TARGETNAME).dll \
-               -Wl,--image-base,0x77780000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
-
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
-
-$(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
-       $(CP) $(TARGETNAME).dll ../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
-
-include ../../rules.mak
+TARGET_CLEAN = misc/*.o
 
+# EOF
index 79acdac..69a8fca 100644 (file)
@@ -1,33 +1,31 @@
-# $Id: makefile,v 1.7 2000/11/20 19:59:10 ekohl Exp $
-#
-# loadros makefile
-#
+# $Id: makefile,v 1.8 2001/08/21 20:13:08 chorns Exp $
+
 PATH_TO_TOP = ../..
 
+include $(PATH_TO_TOP)/rules.mak
+
 all: loadros.com
 
 loadros.com: loadros.asm
-       $(NASM_CMD) -fbin loadros.asm -o loadros.com
+       $(NASM_CMD) -fbin -o loadros.com loadros.asm
 
 clean:
        - $(RM) loadros.com
 
 .PHONY: clean
 
-install: $(FLOPPY_DIR)/loadros.com
+install: $(INSTALL_DIR)/loadros.com
 
-$(FLOPPY_DIR)/loadros.com: loadros.com
-       $(CP) loadros.com $(FLOPPY_DIR)/loadros.com
+$(INSTALL_DIR)/loadros.com: loadros.com
+       $(CP) loadros.com $(INSTALL_DIR)/loadros.com
 
 .PHONY: install
 
-dist: ../../$(DIST_DIR)/loadros.com
+dist: $(DIST_DIR)/loadros.com
 
-../../$(DIST_DIR)/loadros.com: loadros.com
-       $(CP) loadros.com ../../$(DIST_DIR)/loadros.com
+$(DIST_DIR)/loadros.com: loadros.com
+       $(CP) loadros.com $(DIST_DIR)/loadros.com
 
 .PHONY: dist
 
-
-include ../../rules.mak
-#EOF
+# EOF
index c681caf..7f4a09e 100644 (file)
@@ -3,9 +3,4 @@ junk.tmp
 ntoskrnl.coff
 objects
 temp.exp
-depends
-depends.exe
-mkconfig
-mkconfig.exe
 ntoskrnl.dbg
-config
index 435083c..f4d4ebc 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.49 2001/07/21 20:16:09 ea Exp $
+# $Id: Makefile,v 1.50 2001/08/21 20:13:08 chorns Exp $
 #
 # ReactOS Operating System
 #
@@ -9,19 +9,14 @@
 PATH_TO_TOP := ..
 
 #
-# Include details of the kernel configuration
+# Include details of the host OS configuration
 #
+include $(PATH_TO_TOP)/config
 
-include config
-
-#
-#
-#
 CONFIG :=
 
 ifeq ($(DBG), 1)
 CFLAGS_DBG := -g
-CONFIG += DBG
 LINKER_SCRIPT := ntoskrnl.lnk
 STRIP_FLAGS := -Wl,-s
 else
@@ -33,41 +28,30 @@ endif
 ifeq ($(KDBG), 1)
 OBJECTS_KDBG := dbg/kdb.o dbg/kdb_keyboard.o dbg/rdebug.o \
                 dbg/i386/kdb_help.o
-CONFIG += KDBG
 else
 OBJECTS_KDBG :=
 endif
 
-ifeq ($(MP), 1)
-CONFIG += MP
-else
-CONFIG += UP
-endif
 
-ifeq ($(ACPI), 1)
-CONFIG += ACPI
-else
-CONFIG +=
-endif
+ASFLAGS += -I./include -I$(SDK_PATH_INC)
+CFLAGS += -I./include -I$(SDK_PATH_INC) -D__NTOSKRNL__ $(CFLAGS_DBG) -Wall -Werror
 
-TARGETNAME := ntoskrnl
+#
+# Build configuration
+#
+include $(PATH_TO_TOP)/rules.mak
 
-OBJECTS_PATH = objects
 
-ASFLAGS = -Iinclude
-CFLAGS = -Iinclude -D__NTOSKRNL__ $(CFLAGS_DBG) -Wall -Werror
+TARGETNAME := ntoskrnl
 
-include $(PATH_TO_TOP)/rules.mak
+OBJECTS_PATH = objects
 
-all: $(EXE_PREFIX)depends$(EXE_POSTFIX) include/internal/config.h \
+all: \
        $(OBJECTS_PATH) \
        $(TARGETNAME).nostrip.exe \
        $(TARGETNAME).exe \
        $(TARGETNAME).sym 
 
-$(EXE_PREFIX)depends$(EXE_POSTFIX): depends.c
-       $(HOST_CC) -o depends$(EXE_POSTFIX) depends.c
-
 #
 # Architecture specific Makefile
 # Defines $(OBJECTS_ARCH)
@@ -187,6 +171,7 @@ OBJECTS_IO = \
        io/mdl.o \
        io/npipe.o \
        io/page.o \
+       io/parttab.o \
        io/pnpmgr.o \
        io/pnproot.o \
        io/process.o \
@@ -321,14 +306,18 @@ OBJECTS_KD = \
        kd/service.o \
        kd/dlog.o
 
-C_OBJECTS := $(OBJECTS_NT) $(OBJECTS_HAL) $(OBJECTS_MM) $(OBJECTS_ARCH) \
+DEP_OBJECTS := $(OBJECTS_NT) $(OBJECTS_MM) $(OBJECTS_ARCH) \
        $(OBJECTS_IO) $(OBJECTS_KE) $(OBJECTS_OB) \
        $(OBJECTS_PS) $(OBJECTS_EX) $(OBJECTS_CC) $(OBJECTS_FS) $(OBJECTS_SE) \
        $(OBJECTS_DBG) $(OBJECTS_CM) $(OBJECTS_LDR) $(OBJECTS_LPC) \
        $(OBJECTS_PO) $(OBJECTS_KD) $(OBJECTS_RTL)
 
-D_FILES := $(filter-out ex/napi.%, $(filter-out nt/zw.%, $(C_OBJECTS:.o=.d)))
-D1_FILES := $(join $(dir $(D_FILES)), $(addprefix ., $(notdir $(D_FILES))))
+
+#
+# Include automatic dependancy tracking
+#
+include $(PATH_TO_TOP)/tools/depend.mk
+
 
 # Resources
 OBJECTS_RESOURCE = \
@@ -342,15 +331,11 @@ IE_DATA = \
 $(OBJECTS_PATH):
        mkdir $(OBJECTS_PATH)
 
+$(OBJECTS_RESOURCE): $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
+
 #
 # Build subsystem intermediate objects
 #
-$(OBJECTS_PATH)/hal.o: $(OBJECTS_HAL)
-       $(LD) \
-               -r \
-               -o $(OBJECTS_PATH)/hal.o \
-               $(OBJECTS_HAL)
-
 $(OBJECTS_PATH)/arch.o: $(OBJECTS_ARCH)
        $(LD) -r -o $(OBJECTS_PATH)/arch.o $(OBJECTS_ARCH)
 
@@ -462,14 +447,10 @@ $(OBJECTS_PATH)/kd.o: $(OBJECTS_KD)
                -o $(OBJECTS_PATH)/kd.o \
                $(OBJECTS_KD) 
 
-$(TARGETNAME).coff: $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
-
-
 # Note: arch.o MUST be the first file!!!
 OBJECTS := \
        $(OBJECTS_PATH)/arch.o \
        $(OBJECTS_PATH)/ke.o \
-       $(OBJECTS_PATH)/hal.o \
        $(OBJECTS_PATH)/cc.o \
        $(OBJECTS_PATH)/cm.o \
        $(OBJECTS_PATH)/dbg.o \
@@ -489,15 +470,14 @@ OBJECTS := \
        $(OBJECTS_PATH)/se.o \
        $(OBJECTS_RESOURCE)
 
-
-CLEAN_FILES = $(OBJECTS_PATH)/*.o cc/*.o cm/*.o dbg/*.o dbg/i386/*.o ex/*.o hal/x86/*.o io/*.o \
-              ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o rtl/*.o se/*.o \
-              ke/i386/*.o mm/i386/*.o fs/*.o po/*.o nls/*.o lpc/*.o \
-              kd/*.o $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
+CLEAN_FILES = $(OBJECTS_PATH)/*.o cc/*.o cm/*.o dbg/*.o dbg/i386/*.o ex/*.o \
+              ex/i386/*.o io/*.o ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o \
+              rtl/*.o se/*.o ke/i386/*.o mm/i386/*.o fs/*.o po/*.o nls/*.o \
+              lpc/*.o kd/*.o $(TARGETNAME).o junk.tmp base.tmp temp.exp \
               $(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym \
-             $(TARGETNAME).coff $(D1_FILES)
+                   $(TARGETNAME).coff $(DEP_FILES)
 
-$(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(TARGETNAME).a $(IE_DATA)
+$(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(DDK_PATH_LIB)/$(TARGETNAME).a $(IE_DATA)
        $(CC) \
                -Wl,-T,ntoskrnl.lnk \
                -nostartfiles \
@@ -509,7 +489,8 @@ $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(TARGETNAME).a $(IE_DATA)
                -Wl,--file-alignment,0x1000 \
                -Wl,--section-alignment,0x1000 \
                -Wl,--base-file,base.tmp \
-               $(TARGETNAME).o -lgcc
+               $(TARGETNAME).o -lgcc \
+               $(DDK_PATH_LIB)/hal.a
        - $(RM) junk.tmp
        $(DLLTOOL) \
                --dllname $(TARGETNAME).exe \
@@ -529,11 +510,12 @@ $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(TARGETNAME).a $(IE_DATA)
                -Wl,--file-alignment,0x1000 \
                -Wl,--section-alignment,0x1000 \
                -Wl,temp.exp \
-               $(TARGETNAME).o -lgcc
+               $(TARGETNAME).o -lgcc \
+               $(DDK_PATH_LIB)/hal.a
        - $(RM) temp.exp
 
-$(TARGETNAME).exe: $(TARGETNAME).o $(TARGETNAME).a $(LINKER_SCRIPT)
-       $(CC) \
+$(TARGETNAME).exe: $(TARGETNAME).o $(DDK_PATH_LIB)/$(TARGETNAME).a $(LINKER_SCRIPT) $(DDK_PATH_LIB)/hal.a
+       $(CC) \
                -Wl,-T,$(LINKER_SCRIPT) \
                -nostartfiles \
                -nostdlib \
@@ -544,7 +526,8 @@ $(TARGETNAME).exe: $(TARGETNAME).o $(TARGETNAME).a $(LINKER_SCRIPT)
                -Wl,--file-alignment,0x1000 \
                -Wl,--section-alignment,0x1000 \
                -Wl,--base-file,base.tmp \
-               $(TARGETNAME).o -lgcc
+               $(TARGETNAME).o -lgcc \
+               $(DDK_PATH_LIB)/hal.a
        - $(RM) junk.tmp
        $(DLLTOOL) \
                --dllname $(TARGETNAME).exe \
@@ -564,7 +547,8 @@ $(TARGETNAME).exe: $(TARGETNAME).o $(TARGETNAME).a $(LINKER_SCRIPT)
                -Wl,--file-alignment,0x1000 \
                -Wl,--section-alignment,0x1000 \
                -Wl,temp.exp \
-               $(TARGETNAME).o -lgcc
+               $(TARGETNAME).o -lgcc \
+               $(DDK_PATH_LIB)/hal.a
        - $(RM) temp.exp
 
 $(TARGETNAME).dbg.o: $(TARGETNAME).o
@@ -582,7 +566,8 @@ $(TARGETNAME).dbg: $(TARGETNAME).dbg.o $(TARGETNAME).a $(TARGETNAME).dbg.lnk
                -Wl,--file-alignment,0x1000 \
                -Wl,--section-alignment,0x1000 \
                -Wl,--base-file,base.tmp \
-               $(TARGETNAME).dbg.o -lgcc
+               $(TARGETNAME).dbg.o -lgcc \
+               $(DDK_PATH_LIB)/hal.a
        - $(RM) junk.tmp
        $(DLLTOOL) \
                --dllname $(TARGETNAME).dbg \
@@ -602,7 +587,8 @@ $(TARGETNAME).dbg: $(TARGETNAME).dbg.o $(TARGETNAME).a $(TARGETNAME).dbg.lnk
                -Wl,--file-alignment,0x1000 \
                -Wl,--section-alignment,0x1000 \
                -Wl,temp.exp \
-               $(TARGETNAME).dbg.o -lgcc
+               $(TARGETNAME).dbg.o -lgcc \
+               $(DDK_PATH_LIB)/hal.a
        - $(RM) temp.exp
 
 $(TARGETNAME).sym: $(TARGETNAME).nostrip.exe
@@ -614,11 +600,11 @@ $(TARGETNAME).o: $(OBJECTS)
                -o $(TARGETNAME).o \
                $(OBJECTS)
 
-$(TARGETNAME).a: $(TARGETNAME).def
+$(DDK_PATH_LIB)/$(TARGETNAME).a: $(TARGETNAME).def
        $(DLLTOOL) \
                --dllname $(TARGETNAME).exe \
                --def $(TARGETNAME).def \
-               --output-lib $(TARGETNAME).a \
+               --output-lib $(DDK_PATH_LIB)/$(TARGETNAME).a \
                --kill-at
 
 clean: 
@@ -626,17 +612,17 @@ clean:
 
 .PHONY: clean 
 
-install: $(FLOPPY_DIR)/$(TARGETNAME).exe
+install: $(INSTALL_DIR)/system32/$(TARGETNAME).exe
 
-$(FLOPPY_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
-       $(CP) $(TARGETNAME).exe $(FLOPPY_DIR)/$(TARGETNAME).exe
+$(INSTALL_DIR)/system32/$(TARGETNAME).exe: $(TARGETNAME).exe
+       $(CP) $(TARGETNAME).exe $(INSTALL_DIR)/system32/$(TARGETNAME).exe
 
 .PHONY: install
 
-dist: $(PATH_TO_TOP)/$(DIST_DIR)/$(TARGETNAME).exe
+dist: $(DIST_DIR)/$(TARGETNAME).exe
 
-$(PATH_TO_TOP)/$(DIST_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
-       $(CP) $(TARGETNAME).exe $(PATH_TO_TOP)/$(DIST_DIR)/$(TARGETNAME).exe
+$(DIST_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
+       $(CP) $(TARGETNAME).exe $(DIST_DIR)/$(TARGETNAME).exe
 
 .PHONY: dist
 
@@ -644,29 +630,17 @@ ex/napi.o: ex/napi.c $(PATH_TO_TOP)/include/ntdll/napi.h
 
 ke/main.o: ke/main.c $(PATH_TO_TOP)/include/reactos/buildno.h
 
-mkconfig$(EXE_SUFFIX): mkconfig.c
-       $(HOST_CC) -g -o mkconfig$(EXE_SUFFIX) mkconfig.c
-
-config:
-       $(EXE_PREFIX)mkconfig$(EXE_SUFFIX) include/internal/config.h $(CONFIG)
-
-include/internal/config.h: config mkconfig$(EXE_SUFFIX)
-       $(EXE_PREFIX)mkconfig$(EXE_SUFFIX) include/internal/config.h$(CONFIG)
-
-ifneq ($(MAKECMDGOALS),clean)
-include $(D1_FILES)
-endif
-
-.%.d: %.c $(EXE_PREFIX)depends$(EXE_POSTFIX)
-       $(CC) $(CFLAGS) -M $< | $(EXE_PREFIX)depends$(EXE_POSTFIX) $(@D) $@
-
-.%.d: %.s
-       $(CC) $(CFLAGS) -M $< | $(EXE_PREFIX)depends$(EXE_POSTFIX) $(@D) $@ 
-
-.%.d: %.S
-       $(CC) $(CFLAGS) -M $< | $(EXE_PREFIX)depends$(EXE_POSTFIX) $(@D) $@
-
-.%.d: %.asm
-       $(NASM_CMD) $< | $(EXE_PREFIX)depends$(EXE_POSTFIX) $(@D) $@
+%.o: %.cc
+       $(CC) $(CFLAGS) -c $< -o $@
+%.o: %.c
+       $(CC) $(CFLAGS) -c $< -o $@
+%.o: %.S
+       $(AS) $(ASFLAGS) -c $< -o $@
+%.o: %.s
+       $(AS) $(ASFLAGS) -c $< -o $@    
+%.o: %.asm
+       $(NASM_CMD) $(NFLAGS) $< -o $@
+%.coff: %.rc
+       $(RC) $(RCINC) $< -o $@
 
 # EOF
index be07f02..440e9d6 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # Defines $(OBJECTS_HAL)
-include hal/x86/sources
+include hal/x86/sources
 
 OBJECTS_BOOT := ke/i386/multiboot.o
 
index 1a89492..4349443 100644 (file)
@@ -47,7 +47,7 @@
 #define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
 #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
 
-#if defined(KDBG) && defined(NDEBUG)
+#if defined(KDBG) && defined(NDEBUG) && defined(__NTOSKRNL__)
 
 #define DPRINT(args...) do { \
   if (DbgShouldPrint(__FILE__)) { \
@@ -58,7 +58,7 @@
 
 #define CHECKPOINT
 
-#else /* KDBG && NDEBUG */
+#else /* KDBG && NDEBUG && __NTOSKRNL__ */
 
 #ifndef NDEBUG
 #define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
index 07970eb..1b79c9c 100644 (file)
@@ -84,4 +84,12 @@ VOID
 LdrInitDebug(PLOADER_MODULE Module, PWCH Name);
 VOID LdrLoadUserModuleSymbols(PLDR_MODULE ModuleObject);
 
+PVOID LdrSafePEProcessModule(
+       PVOID ModuleLoadBase,
+  PVOID DriverBase,
+       PVOID ImportModuleBase,
+       PULONG DriverSize);
+
+extern ULONG_PTR LdrHalBase;
+
 #endif /* __INCLUDE_INTERNAL_LDR_H */
index e3142ed..f77d9ff 100644 (file)
@@ -487,7 +487,6 @@ VOID PiShutdownProcessManager(VOID);
 VOID PsInitThreadManagment(VOID);
 VOID PsInitProcessManagment(VOID);
 VOID PsInitIdleThread(VOID);
-VOID PsDispatchThread(ULONG NewThreadStatus);
 VOID PsDispatchThreadNoLock(ULONG NewThreadStatus);
 VOID PiTerminateProcessThreads(PEPROCESS Process, NTSTATUS ExitStatus);
 VOID PsTerminateOtherThread(PETHREAD Thread, NTSTATUS ExitStatus);
diff --git a/reactos/ntoskrnl/io/parttab.c b/reactos/ntoskrnl/io/parttab.c
new file mode 100644 (file)
index 0000000..25ac725
--- /dev/null
@@ -0,0 +1,62 @@
+/* $Id: parttab.c,v 1.1 2001/08/21 20:13:09 chorns Exp $
+ *
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS kernel
+ * FILE:            ntoskrnl/io/parttab.c
+ * PURPOSE:         Handling fixed disks (partition table functions)
+ * PROGRAMMER:      David Welch (welch@mcmail.com)
+ * UPDATE HISTORY:
+ *                  Created 22/05/98
+ * 2000-03-25 (ea)
+ *     Moved here from ntoskrnl/io/fdisk.c
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ddk/ntddk.h>
+
+#include <internal/debug.h>
+
+/* FUNCTIONS *****************************************************************/
+
+NTSTATUS STDCALL
+IoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
+                    ULONG SectorSize,
+                    BOOLEAN ReturnRecognizedPartitions,
+                    PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
+{
+       return HalDispatchTable.HalIoReadPartitionTable(DeviceObject,
+                                                       SectorSize,
+                                                       ReturnRecognizedPartitions,
+                                                       PartitionBuffer);
+}
+
+
+NTSTATUS STDCALL
+IoSetPartitionInformation(PDEVICE_OBJECT DeviceObject,
+                         ULONG SectorSize,
+                         ULONG PartitionNumber,
+                         ULONG PartitionType)
+{
+   return HalDispatchTable.HalIoSetPartitionInformation(DeviceObject,
+                                                       SectorSize,
+                                                       PartitionNumber,
+                                                       PartitionType);
+}
+
+
+NTSTATUS STDCALL
+IoWritePartitionTable(PDEVICE_OBJECT DeviceObject,
+                     ULONG SectorSize,
+                     ULONG SectorsPerTrack,
+                     ULONG NumberOfHeads,
+                     PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
+{
+   return HalDispatchTable.HalIoWritePartitionTable(DeviceObject,
+                                                   SectorSize,
+                                                   SectorsPerTrack,
+                                                   NumberOfHeads,
+                                                   PartitionBuffer);
+}
+
+/* EOF */
index 4134992..0d5a4a5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: xhaldrv.c,v 1.14 2001/07/04 16:42:37 rex Exp $
+/* $Id: xhaldrv.c,v 1.15 2001/08/21 20:13:09 chorns Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -638,8 +638,9 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
                    PartitionTable->Partition[i].BootFlags,
                    PartitionTable->Partition[i].PartitionType,
                    PartitionTable->Partition[i].StartingHead,
-                   PartitionTable->Partition[i].StartingSector,
-                   PartitionTable->Partition[i].StartingCylinder,
+                   PartitionTable->Partition[i].StartingSector & 0x3f,
+                   (((PartitionTable->Partition[i].StartingSector) & 0xc0) << 2) +
+          PartitionTable->Partition[i].StartingCylinder,
                    PartitionTable->Partition[i].EndingHead,
                    PartitionTable->Partition[i].EndingSector,
                    PartitionTable->Partition[i].EndingCylinder,
index f493691..faff974 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: main.c,v 1.101 2001/07/14 21:10:31 chorns Exp $
+/* $Id: main.c,v 1.102 2001/08/21 20:13:09 chorns Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/ke/main.c
 #include <internal/trap.h>
 #include "../dbg/kdb.h"
 
+#ifdef HALDBG
+#include <internal/ntosdbg.h>
+#else
+#define ps(args...)
+#endif
+
 #define NDEBUG
 #include <internal/debug.h>
 
@@ -65,6 +71,8 @@ static ULONG LastKrnlPhysAddr;
 static ULONG LastKernelAddress;
 volatile BOOLEAN Initialized = FALSE;
 
+extern PVOID Ki386InitialStackArray[MAXIMUM_PROCESSORS];
+
 /* FUNCTIONS ****************************************************************/
 
 static BOOLEAN
@@ -459,9 +467,9 @@ ExpInitializeExecutive(VOID)
   assert(FIELD_OFFSET(KPCR, ExceptionList) == KPCR_EXCEPTION_LIST);
   assert(FIELD_OFFSET(KPCR, Self) == KPCR_SELF);
   assert(FIELD_OFFSET(KPCR, CurrentThread) == KPCR_CURRENT_THREAD);
-  
+
   LdrInit1();
-  
+
   KeLowerIrql(DISPATCH_LEVEL);
   
   NtEarlyInitVdm();
@@ -507,12 +515,18 @@ ExpInitializeExecutive(VOID)
 
   while (!HalAllProcessorsStarted())
     {
+      PVOID ProcessorStack;
+
       if (KeNumberProcessors != 0)
        {
          KePrepareForApplicationProcessorInit(KeNumberProcessors);
          PsPrepareForApplicationProcessorInit(KeNumberProcessors);
        }
-      HalInitializeProcessor(KeNumberProcessors);
+      /* Allocate a stack for use when booting the processor */
+      /* FIXME: The nonpaged memory for the stack is not released after use */
+      ProcessorStack = ExAllocatePool(NonPagedPool, MM_STACK_SIZE) + MM_STACK_SIZE;
+      Ki386InitialStackArray[((int)KeNumberProcessors)] = (PVOID)(ProcessorStack - MM_STACK_SIZE);
+      HalInitializeProcessor(KeNumberProcessors, ProcessorStack);
       KeNumberProcessors++;
     }
 
@@ -670,7 +684,7 @@ ExpInitializeExecutive(VOID)
                        NULL,
                        NULL,
                        NULL);
-  
+
   /*
    * Initialize shared user page:
    *  - set dos system path, dos device map, etc.
@@ -681,14 +695,16 @@ ExpInitializeExecutive(VOID)
    *  Launch initial process
    */
   LdrLoadInitialProcess();
-  
+
   PsTerminateSystemThread(STATUS_SUCCESS);
 }
 
+
 VOID
 KiSystemStartup(BOOLEAN BootProcessor)
 {
   HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
+
   if (BootProcessor)
     {
       /* Never returns */
@@ -719,7 +735,13 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock)
   ULONG size;
   ULONG last_kernel_address;
   extern ULONG _bss_end__;
-  
+  ULONG HalBase;
+  ULONG DriverBase;
+  ULONG DriverSize;
+
+  /* Low level architecture specific initialization */
+  KeInit1();
+
   /*
    * Copy the parameters to a local buffer because lowmem will go away
    */
@@ -751,9 +773,27 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock)
       KeLoaderModules[i].ModEnd += 0xc0000000;
       KeLoaderModules[i].String = (ULONG)KeLoaderModuleStrings[i];
     }
-  
-  last_kernel_address = KeLoaderModules[KeLoaderBlock.ModsCount - 1].ModEnd;
-  
+
+#ifdef HAL_DBG
+  HalnInitializeDisplay((PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
+#endif
+
+  HalBase = KeLoaderModules[1].ModStart;
+  DriverBase = KeLoaderModules[KeLoaderBlock.ModsCount - 1].ModEnd;
+
+  /*
+   * Process hal.dll
+   */
+  LdrSafePEProcessModule((PVOID)HalBase, (PVOID)DriverBase, (PVOID)0xC0000000, &DriverSize);
+
+  LdrHalBase = (ULONG_PTR)DriverBase;
+  last_kernel_address = DriverBase + DriverSize;
+
+  /*
+   * Process ntoskrnl.exe
+   */
+  LdrSafePEProcessModule((PVOID)0xC0000000, (PVOID)0xC0000000, (PVOID)DriverBase, &DriverSize);
+
   FirstKrnlPhysAddr = KeLoaderModules[0].ModStart - 0xc0000000 + 0x200000;
   LastKrnlPhysAddr = last_kernel_address - 0xc0000000 + 0x200000;
   LastKernelAddress = last_kernel_address;
@@ -778,8 +818,6 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock)
           i += size;
         }
     }
-
-  KeInit1();
   
   KiSystemStartup(1);
 }
index 3324a09..84b17d8 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: loader.c,v 1.84 2001/07/30 03:05:30 rex Exp $
+/* $Id: loader.c,v 1.85 2001/08/21 20:13:09 chorns Exp $
  * 
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
 #include <internal/ldr.h>
 #include <internal/pool.h>
 
+#ifdef HALDBG
+#include <internal/ntosdbg.h>
+#else
+#define ps(args...)
+#endif
+
 #define NDEBUG
 #include <internal/debug.h>
 
-
 /* MACROS ********************************************************************/
 
 #define  KERNEL_MODULE_NAME  L"ntoskrnl.exe"
+#define  HAL_MODULE_NAME  L"hal.dll"
 #define  MODULE_ROOT_NAME  L"\\Modules\\"
 #define  FILESYSTEM_ROOT_NAME  L"\\FileSystem\\"
 
@@ -51,7 +57,8 @@ LIST_ENTRY ModuleListHead;
 POBJECT_TYPE EXPORTED IoDriverObjectType = NULL;
 LIST_ENTRY ModuleTextListHead;
 STATIC MODULE_TEXT_SECTION NtoskrnlTextSection;
-/* STATIC MODULE_TEXT_SECTION HalTextSection; */
+STATIC MODULE_TEXT_SECTION LdrHalTextSection;
+ULONG_PTR LdrHalBase;
 
 #define TAG_DRIVER_MEM  TAG('D', 'R', 'V', 'M')
 #define TAG_SYM_BUF     TAG('S', 'Y', 'M', 'B')
@@ -81,6 +88,12 @@ static PVOID  LdrPEGetExportAddress(PMODULE_OBJECT ModuleObject,
 static PMODULE_OBJECT LdrPEGetModuleObject(PUNICODE_STRING ModuleName);
 static PVOID LdrPEFixupForward(PCHAR ForwardName);
 
+static PVOID
+LdrSafePEGetExportAddress(
+               PVOID ImportModuleBase,
+    char *Name,
+    unsigned short Hint);
+
 
 /* FUNCTIONS *****************************************************************/
 
@@ -121,6 +134,7 @@ LdrInit1(VOID)
 
   InitializeListHead(&ModuleTextListHead);
 
+  /* Setup ntoskrnl.exe text section */
   DosHeader = (PIMAGE_DOS_HEADER) KERNEL_BASE;
   FileHeader =
     (PIMAGE_FILE_HEADER) ((DWORD)KERNEL_BASE + 
@@ -136,6 +150,23 @@ LdrInit1(VOID)
   NtoskrnlTextSection.SymbolsBase = NULL;
   NtoskrnlTextSection.SymbolsLength = 0;
   InsertTailList(&ModuleTextListHead, &NtoskrnlTextSection.ListEntry);
+
+  /* Setup hal.dll text section */
+  DosHeader = (PIMAGE_DOS_HEADER)LdrHalBase;
+  FileHeader =
+    (PIMAGE_FILE_HEADER) ((DWORD)LdrHalBase + 
+                         DosHeader->e_lfanew + sizeof(ULONG));
+  OptionalHeader = (PIMAGE_OPTIONAL_HEADER)
+    ((DWORD)FileHeader + sizeof(IMAGE_FILE_HEADER));
+  SectionList = (PIMAGE_SECTION_HEADER)
+    ((DWORD)OptionalHeader + sizeof(IMAGE_OPTIONAL_HEADER));
+  LdrHalTextSection.Base = LdrHalBase;
+  LdrHalTextSection.Length = SectionList[0].Misc.VirtualSize +
+    SectionList[0].VirtualAddress;
+  LdrHalTextSection.Name = HAL_MODULE_NAME;
+  LdrHalTextSection.SymbolsBase = NULL;
+  LdrHalTextSection.SymbolsLength = 0;
+  InsertTailList(&ModuleTextListHead, &LdrHalTextSection.ListEntry);
 }
 
 VOID LdrInitModuleManagement(VOID)
@@ -242,7 +273,51 @@ VOID LdrInitModuleManagement(VOID)
    ModuleObject->Length = ModuleObject->Image.PE.OptionalHeader->SizeOfImage;
    ModuleObject->TextSection = &NtoskrnlTextSection;
 
-  /* FIXME: Add fake module entry for HAL */
+  /*  Add module entry for HAL  */
+  wcscpy(NameBuffer, MODULE_ROOT_NAME);
+  wcscat(NameBuffer, HAL_MODULE_NAME);
+  RtlInitUnicodeString (&ModuleName, NameBuffer);
+  DPRINT("HAL's Module name is: %wZ\n", &ModuleName);
+
+  /*  Initialize ObjectAttributes for ModuleObject  */
+  InitializeObjectAttributes(&ObjectAttributes,
+                             &ModuleName,
+                             0,
+                             NULL,
+                             NULL);
+
+  /*  Create module object  */
+  ModuleHandle = 0;
+  Status = ObCreateObject(&ModuleHandle,
+                          STANDARD_RIGHTS_REQUIRED,
+                          &ObjectAttributes,
+                          IoDriverObjectType,
+                          (PVOID*)&ModuleObject);
+  assert(NT_SUCCESS(Status));
+
+   /*  Initialize ModuleObject data  */
+   ModuleObject->Base = (PVOID) LdrHalBase;
+   ModuleObject->Flags = MODULE_FLAG_PE;
+   InsertTailList(&ModuleListHead,
+                 &ModuleObject->ListEntry);
+   RtlCreateUnicodeString(&ModuleObject->FullName,
+                         HAL_MODULE_NAME);
+   LdrpBuildModuleBaseName(&ModuleObject->BaseName,
+                          &ModuleObject->FullName);
+
+  DosHeader = (PIMAGE_DOS_HEADER) LdrHalBase;
+  ModuleObject->Image.PE.FileHeader =
+    (PIMAGE_FILE_HEADER) ((DWORD) ModuleObject->Base +
+    DosHeader->e_lfanew + sizeof(ULONG));
+  ModuleObject->Image.PE.OptionalHeader = (PIMAGE_OPTIONAL_HEADER)
+    ((DWORD)ModuleObject->Image.PE.FileHeader + sizeof(IMAGE_FILE_HEADER));
+  ModuleObject->Image.PE.SectionList = (PIMAGE_SECTION_HEADER)
+    ((DWORD)ModuleObject->Image.PE.OptionalHeader + sizeof(IMAGE_OPTIONAL_HEADER));
+  ModuleObject->EntryPoint = (PVOID) ((DWORD) ModuleObject->Base +
+    ModuleObject->Image.PE.OptionalHeader->AddressOfEntryPoint);
+  DPRINT("ModuleObject:%08x  entrypoint at %x\n", ModuleObject, ModuleObject->EntryPoint);
+   ModuleObject->Length = ModuleObject->Image.PE.OptionalHeader->SizeOfImage;
+   ModuleObject->TextSection = &LdrHalTextSection;
 }
 
 /*
@@ -790,14 +865,18 @@ VOID LdrLoadAutoConfigDrivers (VOID)
      is created after their module entries */
 
   RtlInitUnicodeString(&ModuleName, KERNEL_MODULE_NAME);
-
   Status = LdrpFindModuleObject(&ModuleName, &ModuleObject);
-  if (NT_SUCCESS(Status)) {
+  if (NT_SUCCESS(Status))
+  {
     LdrpLoadModuleSymbols(ModuleObject);
   }
 
-  /* FIXME: Load symbols for hal.dll */
-
+  RtlInitUnicodeString(&ModuleName, HAL_MODULE_NAME);
+  Status = LdrpFindModuleObject(&ModuleName, &ModuleObject);
+  if (NT_SUCCESS(Status))
+  {
+    LdrpLoadModuleSymbols(ModuleObject);
+  }
 #endif /* KDBG */
 
    /*
@@ -1375,7 +1454,7 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
   PMODULE_OBJECT CreatedModuleObject;
   PVOID *ImportAddressList;
   PULONG FunctionNameList;
-  PCHAR pName, SymbolNameBuf;
+  PCHAR pName;
   WORD Hint;
   OBJECT_ATTRIBUTES  ObjectAttributes;
   UNICODE_STRING  ModuleName;
@@ -1558,8 +1637,6 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
     {
       PIMAGE_IMPORT_MODULE_DIRECTORY ImportModuleDirectory;
 
-      SymbolNameBuf = ExAllocatePoolWithTag(NonPagedPool, 512, TAG_SYM_BUF);
-
       /*  Process each import module  */
       ImportModuleDirectory = (PIMAGE_IMPORT_MODULE_DIRECTORY)
         ((DWORD)DriverBase + PEOptionalHeader->
@@ -1571,22 +1648,14 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
           pName = (PCHAR) DriverBase + 
             ImportModuleDirectory->dwRVAModuleName;
           wcscpy(NameBuffer, MODULE_ROOT_NAME);
-          /*FIXME: (RJJ) hack: if HAL is needed for import, substitute the kernel  */
-          /*  this is necessary until we break the hal out of the kernel  */
-          if (_stricmp (pName, "HAL.dll") == 0)
-            {
-              wcscat (NameBuffer, KERNEL_MODULE_NAME);
-            }
-          else
+
+          for (Idx = 0; NameBuffer[Idx] != 0; Idx++);
+          for (Idx2 = 0; pName[Idx2] != '\0'; Idx2++)
             {
-              for (Idx = 0; NameBuffer[Idx] != 0; Idx++)
-                ;
-              for (Idx2 = 0; pName[Idx2] != '\0'; Idx2++)
-                {
-                  NameBuffer[Idx + Idx2] = (WCHAR) pName[Idx2];
-                }
-              NameBuffer[Idx + Idx2] = 0;
+              NameBuffer[Idx + Idx2] = (WCHAR) pName[Idx2];
             }
+          NameBuffer[Idx + Idx2] = 0;
+
           RtlInitUnicodeString (&ModuleName, NameBuffer);
           DPRINT("Import module: %wZ\n", &ModuleName);
 
@@ -1645,8 +1714,6 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
             }
           ImportModuleDirectory++;
         }
-
-      ExFreePool(SymbolNameBuf);
     }
 
   /*  Create ModuleName string  */
@@ -1728,6 +1795,264 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
   return STATUS_SUCCESS;
 }
 
+PVOID LdrSafePEProcessModule(
+       PVOID ModuleLoadBase,
+  PVOID DriverBase,
+       PVOID ImportModuleBase,
+       PULONG DriverSize)
+{
+  unsigned int Idx, Idx2;
+  ULONG RelocDelta, NumRelocs;
+  DWORD CurrentSize, TotalRelocs;
+  PULONG PEMagic;
+  PIMAGE_DOS_HEADER PEDosHeader;
+  PIMAGE_FILE_HEADER PEFileHeader;
+  PIMAGE_OPTIONAL_HEADER PEOptionalHeader;
+  PIMAGE_SECTION_HEADER PESectionHeaders;
+  PRELOCATION_DIRECTORY RelocDir;
+  PRELOCATION_ENTRY RelocEntry;
+  PVOID *ImportAddressList;
+  PULONG FunctionNameList;
+  PCHAR pName;
+  WORD Hint;
+  UNICODE_STRING  ModuleName;
+  WCHAR  NameBuffer[60];
+
+  ps("Processing PE Module at module base:%08lx\n", ModuleLoadBase);
+
+  /*  Get header pointers  */
+  PEDosHeader = (PIMAGE_DOS_HEADER) ModuleLoadBase;
+  PEMagic = (PULONG) ((unsigned int) ModuleLoadBase + 
+    PEDosHeader->e_lfanew);
+  PEFileHeader = (PIMAGE_FILE_HEADER) ((unsigned int) ModuleLoadBase + 
+    PEDosHeader->e_lfanew + sizeof(ULONG));
+  PEOptionalHeader = (PIMAGE_OPTIONAL_HEADER) ((unsigned int) ModuleLoadBase + 
+    PEDosHeader->e_lfanew + sizeof(ULONG) + sizeof(IMAGE_FILE_HEADER));
+  PESectionHeaders = (PIMAGE_SECTION_HEADER) ((unsigned int) ModuleLoadBase + 
+    PEDosHeader->e_lfanew + sizeof(ULONG) + sizeof(IMAGE_FILE_HEADER) +
+    sizeof(IMAGE_OPTIONAL_HEADER));
+  CHECKPOINT;
+
+  /*  Check file magic numbers  */
+  if (PEDosHeader->e_magic != IMAGE_DOS_MAGIC)
+    {
+      return 0;
+    }
+  if (PEDosHeader->e_lfanew == 0)
+    {
+      return 0;
+    }
+  if (*PEMagic != IMAGE_PE_MAGIC)
+    {
+      return 0;
+    }
+  if (PEFileHeader->Machine != IMAGE_FILE_MACHINE_I386)
+    {
+      return 0;
+    }
+
+  ps("OptionalHdrMagic:%04x LinkVersion:%d.%d\n", 
+         PEOptionalHeader->Magic,
+         PEOptionalHeader->MajorLinkerVersion,
+         PEOptionalHeader->MinorLinkerVersion);
+  ps("Entry Point:%08lx\n", PEOptionalHeader->AddressOfEntryPoint);
+
+  /*  Determine the size of the module  */
+  *DriverSize = PEOptionalHeader->SizeOfImage;
+  ps("DriverSize %x\n",*DriverSize);
+
+  /*  Copy headers over */
+  if (DriverBase != ModuleLoadBase)
+    {
+      memcpy(DriverBase, ModuleLoadBase, PEOptionalHeader->SizeOfHeaders);
+    }
+
+       ps("Hdr: 0x%X\n", (ULONG)PEOptionalHeader);
+       ps("Hdr->SizeOfHeaders: 0x%X\n", (ULONG)PEOptionalHeader->SizeOfHeaders);
+  ps("FileHdr->NumberOfSections: 0x%X\n", (ULONG)PEFileHeader->NumberOfSections);
+
+  /* Ntoskrnl.exe need no relocation fixups since it is linked to run at the same
+     address as it is mapped */
+  if (DriverBase != ModuleLoadBase)
+    {
+      CurrentSize = 0;
+
+  /*  Copy image sections into virtual section  */
+  for (Idx = 0; Idx < PEFileHeader->NumberOfSections; Idx++)
+    {
+      //  Copy current section into current offset of virtual section
+      if (PESectionHeaders[Idx].Characteristics & 
+          (IMAGE_SECTION_CHAR_CODE | IMAGE_SECTION_CHAR_DATA))
+        {
+                //ps("PESectionHeaders[Idx].VirtualAddress (%X) + DriverBase %x\n",
+           //PESectionHeaders[Idx].VirtualAddress, PESectionHeaders[Idx].VirtualAddress + DriverBase);
+           memcpy(PESectionHeaders[Idx].VirtualAddress + DriverBase,
+                  (PVOID)(ModuleLoadBase + PESectionHeaders[Idx].PointerToRawData),
+                  PESectionHeaders[Idx].Misc.VirtualSize > PESectionHeaders[Idx].SizeOfRawData ?
+                  PESectionHeaders[Idx].SizeOfRawData : PESectionHeaders[Idx].Misc.VirtualSize );
+        }
+      else
+        {
+          ps("PESectionHeaders[Idx].VirtualAddress (%X) + DriverBase %x\n",
+                 PESectionHeaders[Idx].VirtualAddress, PESectionHeaders[Idx].VirtualAddress + DriverBase);
+          memset(PESectionHeaders[Idx].VirtualAddress + DriverBase, 
+                 '\0', PESectionHeaders[Idx].Misc.VirtualSize);
+
+        }
+      CurrentSize += ROUND_UP(PESectionHeaders[Idx].Misc.VirtualSize,
+                              PEOptionalHeader->SectionAlignment);
+    }
+
+  /*  Perform relocation fixups  */
+  RelocDelta = (DWORD) DriverBase - PEOptionalHeader->ImageBase;
+  RelocDir = (PRELOCATION_DIRECTORY)(PEOptionalHeader->DataDirectory[
+    IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
+  ps("DrvrBase:%08lx ImgBase:%08lx RelocDelta:%08lx\n", 
+         DriverBase,
+         PEOptionalHeader->ImageBase,
+         RelocDelta);   
+  ps("RelocDir %x\n",RelocDir);
+
+  for (Idx = 0; Idx < PEFileHeader->NumberOfSections; Idx++)
+    {
+       if (PESectionHeaders[Idx].VirtualAddress == (DWORD)RelocDir)
+        {
+           DPRINT("Name %.8s PESectionHeader[Idx].PointerToRawData %x\n",
+                  PESectionHeaders[Idx].Name,
+                  PESectionHeaders[Idx].PointerToRawData);
+           RelocDir = PESectionHeaders[Idx].PointerToRawData + ModuleLoadBase;
+            CurrentSize = PESectionHeaders[Idx].Misc.VirtualSize;
+           break;
+        }
+    }
+
+  ps("RelocDir %08lx CurrentSize %08lx\n", RelocDir, CurrentSize);
+
+  TotalRelocs = 0;
+  while (TotalRelocs < CurrentSize && RelocDir->SizeOfBlock != 0)
+    {
+      NumRelocs = (RelocDir->SizeOfBlock - sizeof(RELOCATION_DIRECTORY)) / 
+        sizeof(WORD);
+      RelocEntry = (PRELOCATION_ENTRY) ((DWORD)RelocDir + 
+        sizeof(RELOCATION_DIRECTORY));
+      for (Idx = 0; Idx < NumRelocs; Idx++)
+        {
+          ULONG Offset;
+          ULONG Type;
+          PDWORD RelocItem;
+          
+          Offset = RelocEntry[Idx].TypeOffset & 0xfff;
+          Type = (RelocEntry[Idx].TypeOffset >> 12) & 0xf;
+          RelocItem = (PDWORD)(DriverBase + RelocDir->VirtualAddress + 
+                               Offset);
+          if (Type == 3)
+            {
+              (*RelocItem) += RelocDelta;
+            }
+          else if (Type != 0)
+            {
+              DbgPrint("Unknown relocation type %x at %x\n",Type, &Type);
+              return 0;
+            }
+        }
+      TotalRelocs += RelocDir->SizeOfBlock;
+      RelocDir = (PRELOCATION_DIRECTORY)((DWORD)RelocDir + 
+        RelocDir->SizeOfBlock);
+    }
+
+    ps("PEOptionalHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] %x\n",
+         PEOptionalHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]
+         .VirtualAddress);
+  }
+
+  /*  Perform import fixups  */
+  if (PEOptionalHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress)
+    {
+      PIMAGE_IMPORT_MODULE_DIRECTORY ImportModuleDirectory;
+
+      /*  Process each import module  */
+      ImportModuleDirectory = (PIMAGE_IMPORT_MODULE_DIRECTORY)
+        ((DWORD)DriverBase + PEOptionalHeader->
+          DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
+
+      ps("Processeing import directory at %p\n", ImportModuleDirectory);
+      
+        {
+          /*  Check to make sure that import lib is kernel  */
+          pName = (PCHAR) DriverBase + 
+            ImportModuleDirectory->dwRVAModuleName;
+          wcscpy(NameBuffer, MODULE_ROOT_NAME);
+          for (Idx = 0; NameBuffer[Idx] != 0; Idx++);
+          for (Idx2 = 0; pName[Idx2] != '\0'; Idx2++)
+            {
+              NameBuffer[Idx + Idx2] = (WCHAR) pName[Idx2];
+            }
+          NameBuffer[Idx + Idx2] = 0;
+          RtlInitUnicodeString (&ModuleName, NameBuffer);
+
+
+          ps("Import module: %wZ\n", &ModuleName);
+
+                 /*  Get the import address list  */
+          ImportAddressList = (PVOID *) ((DWORD)DriverBase + 
+            ImportModuleDirectory->dwRVAFunctionAddressList);
+       
+               ps("  ImportModuleDirectory->dwRVAFunctionAddressList: 0x%X\n",
+                       ImportModuleDirectory->dwRVAFunctionAddressList);
+               ps("  ImportAddressList: 0x%X\n", ImportAddressList);
+
+          /*  Get the list of functions to import  */
+          if (ImportModuleDirectory->dwRVAFunctionNameList != 0)
+            {
+
+                               ps("Using function name list.\n");
+
+                         FunctionNameList = (PULONG) ((DWORD)DriverBase + 
+                ImportModuleDirectory->dwRVAFunctionNameList);
+            }
+          else
+            {
+
+                               ps("Using function address list.\n");
+
+              FunctionNameList = (PULONG) ((DWORD)DriverBase + 
+                ImportModuleDirectory->dwRVAFunctionAddressList);
+            }
+
+                 /*  Walk through function list and fixup addresses  */
+          while (*FunctionNameList != 0L)
+            {
+              if ((*FunctionNameList) & 0x80000000) // hint
+                {
+                  pName = NULL;
+
+                  Hint = (*FunctionNameList) & 0xffff;
+                }
+              else // hint-name
+                {
+                  pName = (PCHAR)((DWORD)DriverBase + 
+                                  *FunctionNameList + 2);
+                  Hint = *(PWORD)((DWORD)DriverBase + *FunctionNameList);
+                }
+                //ps("  Hint:%04x  Name:%s(0x%X)(%x)\n", Hint, pName, pName, ImportAddressList);
+
+                *ImportAddressList = LdrSafePEGetExportAddress(
+                    ImportModuleBase,
+                    pName,
+                    Hint);
+
+              ImportAddressList++;
+              FunctionNameList++;
+            }
+          ImportModuleDirectory++;
+        }
+    }
+
+  ps("Finished importing.\n");
+
+       return 0;
+}
+
 static PVOID
 LdrPEGetExportAddress(PMODULE_OBJECT ModuleObject,
                       char *Name,
@@ -1795,12 +2120,72 @@ LdrPEGetExportAddress(PMODULE_OBJECT ModuleObject,
        CPRINT("Export not found for %d:%s\n",
                 Hint,
                 Name != NULL ? Name : "(Ordinal)");
-       return NULL;
+       KeBugCheck(0);
      }
 
    return ExportAddress;
 }
 
+static PVOID
+LdrSafePEGetExportAddress(
+               PVOID ImportModuleBase,
+    char *Name,
+    unsigned short Hint)
+{
+  WORD  Idx;
+  PVOID  ExportAddress;
+  PWORD  OrdinalList;
+  PDWORD  FunctionList, NameList;
+  PIMAGE_EXPORT_DIRECTORY  ExportDir;
+  ULONG ExportDirSize;
+
+  static BOOLEAN EP = FALSE;
+
+  ExportDir = (PIMAGE_EXPORT_DIRECTORY)
+    RtlImageDirectoryEntryToData(ImportModuleBase,
+         TRUE,
+               IMAGE_DIRECTORY_ENTRY_EXPORT,
+               &ExportDirSize);
+
+  if (!EP) {
+    EP = TRUE;
+    ps("ExportDir %x\n", ExportDir);
+  }
+
+  FunctionList = (PDWORD)((DWORD)ExportDir->AddressOfFunctions + ImportModuleBase);
+  NameList = (PDWORD)((DWORD)ExportDir->AddressOfNames + ImportModuleBase);
+  OrdinalList = (PWORD)((DWORD)ExportDir->AddressOfNameOrdinals + ImportModuleBase);
+
+  ExportAddress = 0;
+
+  if (Name != NULL)
+    {
+      for (Idx = 0; Idx < ExportDir->NumberOfNames; Idx++)
+        {
+          if (!strcmp(Name, (PCHAR) ((DWORD)ImportModuleBase + NameList[Idx])))
+                       {
+              ExportAddress = (PVOID) ((DWORD)ImportModuleBase +
+                FunctionList[OrdinalList[Idx]]);
+              break;
+            }
+        }
+    }
+  else  /*  use hint  */
+    {
+      ExportAddress = (PVOID) ((DWORD)ImportModuleBase +
+        FunctionList[Hint - ExportDir->Base]);
+    }
+
+  if (ExportAddress == 0)
+    {
+           ps("Export not found for %d:%s\n",
+                 Hint,
+                 Name != NULL ? Name : "(Ordinal)");
+                 for (;;);
+    }
+  return ExportAddress;
+}
+
 
 static PMODULE_OBJECT
 LdrPEGetModuleObject(PUNICODE_STRING ModuleName)
index 7d4bf02..c048b92 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: ntoskrnl.def,v 1.112 2001/07/30 03:05:29 rex Exp $
+; $Id: ntoskrnl.def,v 1.113 2001/08/21 20:13:08 chorns Exp $
 ;
 ; reactos/ntoskrnl/ntoskrnl.def
 ;
@@ -15,6 +15,7 @@ DbgBreakPointWithStatus@4
 ;DbgLoadImageSymbols@12
 DbgPrint
 DbgPrompt@12
+DpcQueueSize DATA
 @ExAcquireFastMutexUnsafe@4
 ExAcquireResourceExclusive@8
 ExAcquireResourceExclusiveLite@8
@@ -263,6 +264,7 @@ IoQueueThreadIrp@4
 IoRaiseHardError@12
 IoRaiseInformationalHardError@12
 IoReadOperationCount DATA
+IoReadPartitionTable@16
 IoReadTransferCount DATA
 IoRegisterDriverReinitialization@12
 IoRegisterFileSystem@4
@@ -276,6 +278,7 @@ IoReportResourceUsage@36
 IoSetDeviceToVerify@8
 IoSetHardErrorOrVerifyDevice@8
 IoSetInformation@16
+IoSetPartitionInformation@16
 IoSetShareAccess@16
 IoSetThreadHardErrorMode@4
 IoSetTopLevelIrp@4
@@ -294,12 +297,14 @@ IoUpdateShareAccess@8
 IoVerifyVolume@8
 IoWriteErrorLogEntry@4
 IoWriteOperationCount DATA
+IoWritePartitionTable@20
 IoWriteTransferCount DATA
 @IofCallDriver@8
 @IofCompleteRequest@8
 KdDebuggerEnabled DATA
 KdDebuggerNotPresent DATA
 KdPollBreakIn@0
+KdSystemDebugControl@4
 Ke386CallBios@8
 ;Ke386IoSetAccessProcess
 ;Ke386QueryIoAccessMap
@@ -423,6 +428,7 @@ KiDispatchInterrupt@0
 ;@KiReleaseSpinLock@4
 ;KiUnexpectedInterrupt
 ;Kii386SpinOnSpinLock
+KiRawTicks DATA
 LdrAccessResource@16
 ;LdrEnumResources@20
 ;LdrFindResourceDirectory_U@16
@@ -435,6 +441,7 @@ LdrFindResource_U@16
 ;LsaLookupAuthenticationPackage
 ;LsaRegisterLogonProcess
 MmAdjustWorkingSetSize@12
+MmAllocateContiguousAlignedMemory@16
 MmAllocateContiguousMemory@12
 MmAllocateNonCachedMemory@4
 MmBuildMdlForNonPagedPool@4
@@ -578,6 +585,7 @@ PsAssignImpersonationToken@8
 PsCreateSystemProcess@12
 PsCreateSystemThread@28
 ;PsCreateWin32Process@4
+PsDispatchThread@4
 ;PsEstablishWin32Callouts@24
 PsGetCurrentProcessId@0
 PsGetCurrentThreadId@0
@@ -998,120 +1006,3 @@ wcsspn
 wcsstr
 wcstombs
 wctomb
-;
-;
-; exports from hal.dll
-;
-;
-@ExAcquireFastMutex@4
-@ExReleaseFastMutex@4
-@ExTryToAcquireFastMutex@4
-HalAcquireDisplayOwnership@4
-HalAdjustResourceList@4
-HalAllProcessorsStarted@0
-HalAllocateAdapterChannel@20
-HalAllocateCommonBuffer@16
-;HalAllocateCrashDumpRegisters@8
-HalAssignSlotResources@32
-HalBeginSystemInterrupt@12
-HalCalibratePerformanceCounter@4
-;@HalClearSoftwareInterrupt@4
-HalDisableSystemInterrupt@8
-HalDisplayString@4
-HalEnableSystemInterrupt@12
-HalEndSystemInterrupt@8
-HalFlushCommonBuffer@32
-HalFreeCommonBuffer@24
-HalGetAdapter@8
-HalGetBusData@20
-HalGetBusDataByOffset@24
-HalGetEnvironmentVariable@12
-HalGetInterruptVector@24
-HalHandleNMI@4
-HalInitSystem@8
-HalInitializeProcessor@4
-HalMakeBeep@4
-HalProcessorIdle@0
-HalQueryDisplayParameters@16
-HalQueryRealTimeClock@4
-HalReadDmaCounter@4
-HalReportResourceUsage@0
-HalRequestIpi@4
-;@HalRequestSoftwareInterrupt@4
-HalReturnToFirmware@4
-HalSetBusData@20
-HalSetBusDataByOffset@24
-HalSetDisplayParameters@8
-HalSetEnvironmentVariable@8
-;HalSetProfileInterval@4
-HalSetRealTimeClock@4
-;HalSetTimeIncrement@4
-HalStartNextProcessor@8
-;HalStartProfileInterrupt@4
-;HalStopProfileInterrupt@4
-@HalSystemVectorDispatchEntry@12
-HalTranslateBusAddress@24
-IoAssignDriveLetters@16
-IoFlushAdapterBuffers@24
-IoFreeAdapterChannel@4
-IoFreeMapRegisters@12
-IoMapTransfer@24
-IoReadPartitionTable@16
-IoSetPartitionInformation@16
-IoWritePartitionTable@20
-IoInitializeRemoveLockEx@20
-IoAcquireRemoveLockEx@20
-IoReleaseRemoveLockEx@12
-IoReleaseRemoveLockAndWaitEx@12
-IoAdjustPagingPathCount@8
-IoGetDeviceInterfaceAlias@12
-IoGetDeviceInterfaces@16
-IoGetDeviceProperty@20
-IoInvalidateDeviceRelations@8
-IoInvalidateDeviceState@4
-IoOpenDeviceInterfaceRegistryKey@12
-IoOpenDeviceRegistryKey@16
-IoRegisterDeviceInterface@16
-IoRegisterPlugPlayNotification@28
-IoReportDetectedDevice@32
-IoReportResourceForDetection@28
-IoReportTargetDeviceChange@8
-IoReportTargetDeviceChangeAsynchronous@16
-IoRequestDeviceEject@4
-IoSetDeviceInterfaceState@8
-IoUnregisterPlugPlayNotification@4
-KdComPortInUse DATA
-KdPortGetByte@4
-KdPortInitialize@12
-KdPortPollByte@4
-KdPortPutByte@4
-KdPortRestore@0
-KdPortSave@0
-KeAcquireSpinLock@8
-@KeAcquireSpinLockRaiseToSynch@4
-KeFlushWriteBuffer@0
-KeGetCurrentIrql@0
-KeLowerIrql@4
-KeQueryPerformanceCounter@4
-KeRaiseIrql@8
-KeRaiseIrqlToDpcLevel@0
-KeRaiseIrqlToSynchLevel@0
-KeReleaseSpinLock@8
-KeStallExecutionProcessor@4
-@KfAcquireSpinLock@4
-@KfLowerIrql@4
-@KfRaiseIrql@4
-@KfReleaseSpinLock@8
-READ_PORT_BUFFER_UCHAR@12
-READ_PORT_BUFFER_ULONG@12
-READ_PORT_BUFFER_USHORT@12
-READ_PORT_UCHAR@4
-READ_PORT_ULONG@4
-READ_PORT_USHORT@4
-WRITE_PORT_BUFFER_UCHAR@12
-WRITE_PORT_BUFFER_ULONG@12
-WRITE_PORT_BUFFER_USHORT@12
-WRITE_PORT_UCHAR@8
-WRITE_PORT_ULONG@8
-WRITE_PORT_USHORT@8
-KdSystemDebugControl@4
index 137c2d9..acaa86c 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: ntoskrnl.edf,v 1.98 2001/07/30 03:05:29 rex Exp $
+; $Id: ntoskrnl.edf,v 1.99 2001/08/21 20:13:08 chorns Exp $
 ;
 ; reactos/ntoskrnl/ntoskrnl.def
 ;
@@ -15,6 +15,7 @@ DbgBreakPointWithStatus=DbgBreakPointWithStatus@4
 ;DbgLoadImageSymbols=DbgLoadImageSymbols@12
 DbgPrint
 DbgPrompt=DbgPrompt@12
+DpcQueueSize DATA
 ExAcquireFastMutexUnsafe=@ExAcquireFastMutexUnsafe@4
 ExAcquireResourceExclusive=ExAcquireResourceExclusive@8
 ExAcquireResourceExclusiveLite=ExAcquireResourceExclusiveLite@8
@@ -263,6 +264,7 @@ IoQueueThreadIrp=IoQueueThreadIrp@4
 IoRaiseHardError=IoRaiseHardError@12
 IoRaiseInformationalHardError=IoRaiseInformationalHardError@12
 IoReadOperationCount DATA
+IoReadPartitionTable=IoReadPartitionTable@16
 IoReadTransferCount DATA
 IoRegisterDriverReinitialization=IoRegisterDriverReinitialization@12
 IoRegisterFileSystem=IoRegisterFileSystem@4
@@ -276,6 +278,7 @@ IoReportResourceUsage=IoReportResourceUsage@36
 IoSetDeviceToVerify=IoSetDeviceToVerify@8
 IoSetHardErrorOrVerifyDevice=IoSetHardErrorOrVerifyDevice@8
 IoSetInformation=IoSetInformation@16
+IoSetPartitionInformation=IoSetPartitionInformation@16
 IoSetShareAccess=IoSetShareAccess@16
 IoSetThreadHardErrorMode=IoSetThreadHardErrorMode@4
 IoSetTopLevelIrp=IoSetTopLevelIrp@4
@@ -294,12 +297,14 @@ IoUpdateShareAccess=IoUpdateShareAccess@8
 IoVerifyVolume=IoVerifyVolume@8
 IoWriteErrorLogEntry=IoWriteErrorLogEntry@4
 IoWriteOperationCount DATA
+IoWritePartitionTable=IoWritePartitionTable@20
 IoWriteTransferCount DATA
 IofCallDriver=@IofCallDriver@8
 IofCompleteRequest=@IofCompleteRequest@8
 KdDebuggerEnabled DATA
 KdDebuggerNotPresent DATA
 KdPollBreakIn=KdPollBreakIn@0
+KdSystemDebugControl=KdSystemDebugControl@4
 Ke386CallBios=Ke386CallBios@8
 ;Ke386IoSetAccessProcess
 ;Ke386QueryIoAccessMap
@@ -423,6 +428,7 @@ KiDispatchInterrupt=KiDispatchInterrupt@0
 ;KiReleaseSpinLock@4
 ;KiUnexpectedInterrupt
 ;Kii386SpinOnSpinLock
+KiRawTicks DATA
 LdrAccessResource=LdrAccessResource@16
 ;LdrEnumResources@20
 ;LdrFindResourceDirectory_U@16
@@ -435,6 +441,7 @@ LdrFindResource_U=LdrFindResource_U@16
 ;LsaLookupAuthenticationPackage
 ;LsaRegisterLogonProcess
 MmAdjustWorkingSetSize=MmAdjustWorkingSetSize@12
+MmAllocateContiguousAlignedMemory=MmAllocateContiguousAlignedMemory@16
 MmAllocateContiguousMemory=MmAllocateContiguousMemory@12
 MmAllocateNonCachedMemory=MmAllocateNonCachedMemory@4
 MmBuildMdlForNonPagedPool=MmBuildMdlForNonPagedPool@4
@@ -578,6 +585,7 @@ PsAssignImpersonationToken=PsAssignImpersonationToken@8
 PsCreateSystemProcess=PsCreateSystemProcess@12
 PsCreateSystemThread=PsCreateSystemThread@28
 ;PsCreateWin32Process
+PsDispatchThread=PsDispatchThread@4
 ;PsEstablishWin32Callouts
 PsGetCurrentProcessId=PsGetCurrentProcessId@0
 PsGetCurrentThreadId=PsGetCurrentThreadId@0
@@ -996,120 +1004,3 @@ wcsspn
 wcsstr
 wcstombs
 wctomb
-;
-;
-; exports from hal.dll
-;
-;
-ExAcquireFastMutex=@ExAcquireFastMutex@4
-ExReleaseFastMutex=@ExReleaseFastMutex@4
-ExTryToAcquireFastMutex=@ExTryToAcquireFastMutex@4
-HalAcquireDisplayOwnership=HalAcquireDisplayOwnership@4
-HalAdjustResourceList=HalAdjustResourceList@4
-HalAllProcessorsStarted=HalAllProcessorsStarted@0
-HalAllocateAdapterChannel=HalAllocateAdapterChannel@20
-HalAllocateCommonBuffer=HalAllocateCommonBuffer@16
-;HalAllocateCrashDumpRegisters=HalAllocateCrashDumpRegisters@8
-HalAssignSlotResource=HalAssignSlotResources@32
-HalBeginSystemInterrupt=HalBeginSystemInterrupt@12
-HalCalibratePerformanceCounter=HalCalibratePerformanceCounter@4
-;HalClearSoftwareInterrupt=@HalClearSoftwareInterrupt@4
-HalDisableSystemInterrupt=HalDisableSystemInterrupt@8
-HalDisplayString=HalDisplayString@4
-HalEnableSystemInterrupt=HalEnableSystemInterrupt@12
-HalEndSystemInterrupt=HalEndSystemInterrupt@8
-HalFlushCommonBuffer=HalFlushCommonBuffer@32
-HalFreeCommonBuffer=HalFreeCommonBuffer@24
-HalGetAdapter=HalGetAdapter@8
-HalGetBusData=HalGetBusData@20
-HalGetBusDataByOffset=HalGetBusDataByOffset@24
-HalGetEnvironmentVariable=HalGetEnvironmentVariable@12
-HalGetInterruptVector=HalGetInterruptVector@24
-HalHandleNMI=HalHandleNMI@4
-HalInitSystem=HalInitSystem@8
-HalInitializeProcessor=HalInitializeProcessor@4
-HalMakeBeep=HalMakeBeep@4
-HalProcessorIdle=HalProcessorIdle@0
-HalQueryDisplayParameters=HalQueryDisplayParameters@16
-HalQueryRealTimeClock=HalQueryRealTimeClock@4
-HalReadDmaCounter=HalReadDmaCounter@4
-HalReportResourceUsage=HalReportResourceUsage@0
-HalRequestIpi=HalRequestIpi@4
-;HalRequestSoftwareInterrupt=@HalRequestSoftwareInterrupt@4
-HalReturnToFirmware=HalReturnToFirmware@4
-HalSetBusData=HalSetBusData@20
-HalSetBusDataByOffset=HalSetBusDataByOffset@24
-HalSetDisplayParameters=HalSetDisplayParameters@8
-HalSetEnvironmentVariable=HalSetEnvironmentVariable@8
-;HalSetProfileInterval=HalSetProfileInterval@4
-HalSetRealTimeClock=HalSetRealTimeClock@4
-;HalSetTimeIncrement=HalSetTimeIncrement@4
-HalStartNextProcessor=HalStartNextProcessor@8
-;HalStartProfileInterrupt=HalStartProfileInterrupt@4
-;HalStopProfileInterrupt=HalStopProfileInterrupt@4
-HalSystemVectorDispatchEntry=@HalSystemVectorDispatchEntry@12
-HalTranslateBusAddress=HalTranslateBusAddress@24
-IoAssignDriveLetters=IoAssignDriveLetters@16
-IoFlushAdapterBuffers=IoFlushAdapterBuffers@24
-IoFreeAdapterChannel=IoFreeAdapterChannel@4
-IoFreeMapRegisters=IoFreeMapRegisters@12
-IoMapTransfer=IoMapTransfer@24
-IoReadPartitionTable=IoReadPartitionTable@16
-IoSetPartitionInformation=IoSetPartitionInformation@16
-IoWritePartitionTable=IoWritePartitionTable@20
-IoInitializeRemoveLockEx=IoInitializeRemoveLockEx@20
-IoAcquireRemoveLockEx=IoAcquireRemoveLockEx@20
-IoReleaseRemoveLockEx=IoReleaseRemoveLockEx@12
-IoReleaseRemoveLockAndWaitEx=IoReleaseRemoveLockAndWaitEx@12
-IoAdjustPagingPathCount=IoAdjustPagingPathCount@8
-IoGetDeviceInterfaceAlias=IoGetDeviceInterfaceAlias@12
-IoGetDeviceInterfaces=IoGetDeviceInterfaces@16
-IoGetDeviceProperty=IoGetDeviceProperty@20
-IoInvalidateDeviceRelations=IoInvalidateDeviceRelations@8
-IoInvalidateDeviceState=IoInvalidateDeviceState@4
-IoOpenDeviceInterfaceRegistryKey=IoOpenDeviceInterfaceRegistryKey@12
-IoOpenDeviceRegistryKey=IoOpenDeviceRegistryKey@16
-IoRegisterDeviceInterface=IoRegisterDeviceInterface@16
-IoRegisterPlugPlayNotification=IoRegisterPlugPlayNotification@28
-IoReportDetectedDevice=IoReportDetectedDevice@32
-IoReportResourceForDetection=IoReportResourceForDetection@28
-IoReportTargetDeviceChange=IoReportTargetDeviceChange@8
-IoReportTargetDeviceChangeAsynchronous=IoReportTargetDeviceChangeAsynchronous@16
-IoRequestDeviceEject=IoRequestDeviceEject@4
-IoSetDeviceInterfaceState=IoSetDeviceInterfaceState@8
-IoUnregisterPlugPlayNotification=IoUnregisterPlugPlayNotification@4
-KdComPortInUse DATA
-KdPortGetByte=KdPortGetByte@4
-KdPortInitialize=KdPortInitialize@12
-KdPortPollByte=KdPortPollByte@4
-KdPortPutByte=KdPortPutByte@4
-KdPortRestore=KdPortRestore@0
-KdPortSave=KdPortSave@0
-KeAcquireSpinLock=KeAcquireSpinLock@8
-KeAcquireSpinLockRaiseToSynch=@KeAcquireSpinLockRaiseToSynch@4
-KeFlushWriteBuffer=KeFlushWriteBuffer@0
-KeGetCurrentIrql=KeGetCurrentIrql@0
-KeLowerIrql=KeLowerIrql@4
-KeQueryPerformanceCounter=KeQueryPerformanceCounter@4
-KeRaiseIrql=KeRaiseIrql@8
-KeRaiseIrqlToDpcLevel=KeRaiseIrqlToDpcLevel@0
-KeRaiseIrqlToSynchLevel=KeRaiseIrqlToSynchLevel@0
-KeReleaseSpinLock=KeReleaseSpinLock@8
-KeStallExecutionProcessor=KeStallExecutionProcessor@4
-KfAcquireSpinLock=@KfAcquireSpinLock@4
-KfLowerIrql=@KfLowerIrql@4
-KfRaiseIrql=@KfRaiseIrql@4
-KfReleaseSpinLock=@KfReleaseSpinLock@8
-READ_PORT_BUFFER_UCHAR=READ_PORT_BUFFER_UCHAR@12
-READ_PORT_BUFFER_ULONG=READ_PORT_BUFFER_ULONG@12
-READ_PORT_BUFFER_USHORT=READ_PORT_BUFFER_USHORT@12
-READ_PORT_UCHAR=READ_PORT_UCHAR@4
-READ_PORT_ULONG=READ_PORT_ULONG@4
-READ_PORT_USHORT=READ_PORT_USHORT@4
-WRITE_PORT_BUFFER_UCHAR=WRITE_PORT_BUFFER_UCHAR@12
-WRITE_PORT_BUFFER_ULONG=WRITE_PORT_BUFFER_ULONG@12
-WRITE_PORT_BUFFER_USHORT=WRITE_PORT_BUFFER_USHORT@12
-WRITE_PORT_UCHAR=WRITE_PORT_UCHAR@8
-WRITE_PORT_ULONG=WRITE_PORT_ULONG@8
-WRITE_PORT_USHORT=WRITE_PORT_USHORT@8
-KdSystemDebugControl = KdSystemDebugControl@4
index 70d6f6c..14299b3 100644 (file)
@@ -51,14 +51,15 @@ SECTIONS
     *(.debug$F)
     *(.drectve)
   }
-  /DISCARD/ :
+
+  .idata BLOCK(__section_alignment__) :
   {
     /* This cannot currently be handled with grouped sections.
        See pe.em:sort_sections.  */
     SORT(*)(.idata$2)
     SORT(*)(.idata$3)
     /* These zeroes mark the end of the import list.  */
-/*    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);*/
+    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
     SORT(*)(.idata$4)  
     SORT(*)(.idata$5)
     SORT(*)(.idata$6)
@@ -80,10 +81,12 @@ SECTIONS
     *(COMMON)
     __bss_end__ = . ;
   }
-  /DISCARD/ :
-  {
+  .reloc BLOCK(__section_alignment__) :
+  {                                    
     *(.reloc)
-  }  
+     /* These zeroes mark the end of the reloc section.  */
+     LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+  }
   .stab BLOCK(__section_alignment__) (NOLOAD) :
   {
     [ .stab ]
index 3501793..7531bfd 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.77 2001/04/17 23:39:26 dwelch Exp $
+/* $Id: thread.c,v 1.78 2001/08/21 20:13:10 chorns Exp $
  *
  * COPYRIGHT:              See COPYING in the top level directory
  * PROJECT:                ReactOS kernel
@@ -210,7 +210,7 @@ VOID PsDispatchThreadNoLock (ULONG NewThreadStatus)
    KeBugCheck(0);
 }
 
-VOID 
+VOID STDCALL
 PsDispatchThread(ULONG NewThreadStatus)
 {
    KIRQL oldIrql;
index ab72fdb..dbbc379 100644 (file)
@@ -3,10 +3,13 @@
 #
 .EXPORT_ALL_VARIABLES:
 
+# Windows is default host environment
+ifeq ($(HOST),)
 HOST = mingw32-windows
+endif
 
 # uncomment if you use bochs and it displays only 30 rows
-#BOCHS_30ROWS = yes
+# BOCHS_30ROWS = yes
 
 ifeq ($(HOST),mingw32-linux)
 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
@@ -17,21 +20,14 @@ endif
 #
 ifeq ($(HOST),mingw32-linux)
 NASM_FORMAT = win32
-PREFIX = /usr/mingw32-cvs-000216/bin/mingw32-pc-
-#PREFIX = i586-mingw32-
-#PREFIX = /usr/mingw32-cvs-000207/bin/mingw32-cvs-000207-
+PREFIX = i586-mingw32-
 EXE_POSTFIX := 
 EXE_PREFIX := ./
-#CP = cp
-CP = $(PATH_TO_TOP)/rcopy
 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
-NASM_CMD = nasm
-FLOPPY_DIR = /a
-# DIST_DIR should be relative from the top of the tree
-DIST_DIR = dist
-#DOT := \\.
-#DSEP := /
-#ENABLE_DEPENDENCY_TRACKING := 1
+NASM = nasm
+DOSCLI =
+FLOPPY_DIR = /mnt/floppy
+SEP := /
 endif
 
 ifeq ($(HOST),mingw32-windows)
@@ -39,109 +35,63 @@ NASM_FORMAT = win32
 PREFIX = 
 EXE_PREFIX := 
 EXE_POSTFIX := .exe
-#CP = copy /B
-CP = $(PATH_TO_TOP)/rcopy
 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
 NASM_CMD = nasmw
-RM = $(PATH_TO_TOP)/rdel
-RMDIR = rmdir
 DOSCLI = yes
 FLOPPY_DIR = A:
-# DIST_DIR should be relative from the top of the tree
-DIST_DIR = dist
-#DOT := \.
-#DSEP := \\
-#ENABLE_DEPENDENCY_TRACKING := 1
+SEP := \$(EMPTY_VAR)
 endif
 
+
+# Set INSTALL_DIR to default value if not already set
+# ifeq ($(INSTALL_DIR),)
+INSTALL_DIR = $(PATH_TO_TOP)/reactos
+# endif
+
+# Set DIST_DIR to default value if not already set
+# ifeq ($(DIST_DIR),)
+DIST_DIR = $(PATH_TO_TOP)/dist
+# endif
+
+
 CC = $(PREFIX)gcc
 CXX = $(PREFIX)g++
 HOST_CC = gcc
 HOST_NM = nm
-CFLAGS := $(CFLAGS) -I$(PATH_TO_TOP)/include -pipe -m386
-CXXFLAGS = $(CFLAGS)
-NFLAGS = -i$(PATH_TO_TOP)/include/ -f$(NASM_FORMAT) -d$(NASM_FORMAT)
 LD = $(PREFIX)ld
 NM = $(PREFIX)nm
 OBJCOPY = $(PREFIX)objcopy
 STRIP = $(PREFIX)strip
-ASFLAGS := $(ASFLAGS) -I$(PATH_TO_TOP)/include -D__ASM__
 AS = $(PREFIX)gcc -c -x assembler-with-cpp 
 CPP = $(PREFIX)cpp
 AR = $(PREFIX)ar
 RC = $(PREFIX)windres
 RCINC = --include-dir $(PATH_TO_TOP)/include
 OBJCOPY = $(PREFIX)objcopy
+TOOLS_PATH = $(PATH_TO_TOP)/tools
+CP = $(TOOLS_PATH)/rcopy
+RM = $(TOOLS_PATH)/rdel
+RMDIR = $(TOOLS_PATH)/rrmdir
+RMKDIR = $(TOOLS_PATH)/rmkdir
 
-%.o: %.cpp
-       $(CC) $(CFLAGS) -c $< -o $@
-%.o: %.cc
-       $(CC) $(CFLAGS) -c $< -o $@
-%.o: %.c
-       $(CC) $(CFLAGS) -c $< -o $@
-%.o: %.S
-       $(AS) $(ASFLAGS) -c $< -o $@
-%.o: %.s
-       $(AS) $(ASFLAGS) -c $< -o $@    
-%.o: %.asm
-       $(NASM_CMD) $(NFLAGS) $< -o $@
-%.coff: %.rc
-       $(RC) $(RCINC) $< $@
+# Maybe we can delete these soon
+CFLAGS := $(CFLAGS) -I$(PATH_TO_TOP)/include -pipe -m386
+CXXFLAGS = $(CFLAGS)
+NFLAGS = -i$(PATH_TO_TOP)/include/ -f$(NASM_FORMAT) -d$(NASM_FORMAT)
+ASFLAGS := $(ASFLAGS) -I$(PATH_TO_TOP)/include -D__ASM__
 
-%.sys: %.o
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8\
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@.unstripped \
-               $^
-       - $(RM) temp.exp
-       - $(NM) --numeric-sort $@.unstripped > $@.sym
-       $(STRIP) --strip-debug $<
-       $(CC) \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $^
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $@ \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               --verbose \
-               -Wl,--subsystem,native \
-               -Wl,--image-base,0x10000 \
-               -Wl,-e,_DriverEntry@8 \
-               -Wl,temp.exp \
-               -nostartfiles -nostdlib -e _DriverEntry@8 \
-               -mdll \
-               -o $@ \
-               $^
-       - $(RM) temp.exp
 
-RULES_MAK_INCLUDED = 1
+# Developer Kits
+DK_PATH=$(PATH_TO_TOP)/dk
+# Native and kernel mode
+DDK_PATH=$(DK_PATH)/nkm
+DDK_PATH_LIB=$(DDK_PATH)/lib
+DDK_PATH_INC=$(PATH_TO_TOP)/include
+# Win32
+SDK_PATH=$(DK_PATH)/w32
+SDK_PATH_LIB=$(SDK_PATH)/lib
+SDK_PATH_INC=$(PATH_TO_TOP)/include
+# POSIX+
+XDK_PATH=$(DK_PATH)/psx
+XDK_PATH_LIB=$(XDK_PATH)/lib
+XDK_PATH_INC=$(XDK_PATH)/include
index dc21ad1..7806960 100644 (file)
@@ -1,61 +1,35 @@
-# $Id: makefile,v 1.14 2001/07/15 21:19:02 rex Exp $
-#
-# CSRSS: Client/server runtime subsystem
-#
-# ReactOS Operating System
-#
-PATH_TO_TOP = ../..
-
-TARGET=csrss
-
-CFLAGS = -D__NTAPP__ -I.
-
-OBJECTS_API = api/process.o api/wapi.o api/conio.o api/handle.o
-
-OBJECTS_SBAPI =
-
-OBJECTS_MISC = $(TARGET).o init.o print.o video.o $(TARGET).coff 
-
-OBJECTS = $(OBJECTS_API) $(OBJECTS_SBAPI) $(OBJECTS_MISC)
+# $Id: makefile,v 1.15 2001/08/21 20:13:16 chorns Exp $
 
-CLEAN_FILES = $(OBJECTS) $(TARGET).exe
-
-LIBS = ../../lib/ntdll/ntdll.a
-
-all: $(TARGET).exe
-
-.phony: all
-
-clean:
-       - $(RM) $(CLEAN_FILES)
-
-.phony: clean
+PATH_TO_TOP = ../..
 
-$(TARGET).coff: $(TARGET).rc
-       $(RC) $(TARGET).rc $(TARGET).coff
+TARGET_TYPE = program
 
-$(TARGET).exe: $(OBJECTS) $(LIBS)
-       $(LD) \
-               $(OBJECTS) \
-               $(LIBS) \
-               -o $(TARGET).exe \
-               --subsystem native
-       $(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
+TARGET_APPTYPE = native
 
+TARGET_NAME = csrss
 
-install: $(FLOPPY_DIR)/subsys/$(TARGET).exe
+TARGET_INSTALLDIR = system32
 
-$(FLOPPY_DIR)/subsys/$(TARGET).exe: $(TARGET).exe
-       $(CP) $(TARGET).exe $(FLOPPY_DIR)/subsys/$(TARGET).exe
+TARGET_CFLAGS = -D__NTAPP__
 
+OBJECTS_API = \
+  api/process.o \
+  api/wapi.o \
+  api/conio.o \
+  api/handle.o
 
-dist: $(DIST_DIR)/subsys/$(TARGET).exe
+OBJECTS_MISC = \
+  $(TARGET_NAME).o \
+  init.o \
+  print.o \
+  video.o
 
-$(DIST_DIR)/subsys/$(TARGET).exe: $(TARGET).exe
-       $(CP) $(TARGET).exe ../../$(DIST_DIR)/subsys/$(TARGET).exe
+TARGET_OBJECTS = \
+  $(OBJECTS_API) \
+  $(OBJECTS_MISC)
 
+include $(PATH_TO_TOP)/rules.mak
 
-WITH_DEBUGGING = yes
-include ../../rules.mak
+include $(TOOLS_PATH)/helper.mk
 
 # EOF
index 2d2217c..b37d23c 100644 (file)
@@ -1,51 +1,21 @@
-# $Id: makefile,v 1.8 2001/07/15 21:19:02 rex Exp $
-#
-# Session Manager
-#
-# ReactOS Operating System
-#
-PATH_TO_TOP = ../..
-
-TARGET=smss
-
-CFLAGS = -D__NTAPP__
-
-OBJECTS = $(TARGET).o init.o smapi.o $(TARGET).coff
-
-LIBS = ../../lib/ntdll/ntdll.a
-
-CLEAN_FILES = *.o $(TARGET).exe $(TARGET).sym $(TARGET).coff
+# $Id: makefile,v 1.9 2001/08/21 20:13:17 chorns Exp $
 
-all: $(TARGET).exe
-
-.phony: all
-
-
-$(TARGET).coff: $(TARGET).rc
-
-$(TARGET).exe: $(OBJECTS) $(LIBS)
-       $(LD) \
-               $(OBJECTS) \
-               $(LIBS) \
-               -o $(TARGET).exe \
-               --subsystem native
-       $(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
+PATH_TO_TOP = ../..
 
+TARGET_TYPE = program
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_APPTYPE = native
 
-.PHONY: clean 
+TARGET_NAME = smss
 
-install: $(FLOPPY_DIR)/subsys/$(TARGET).exe
+TARGET_INSTALLDIR = system32
 
-$(FLOPPY_DIR)/subsys/$(TARGET).exe: $(TARGET).exe
-       $(CP) $(TARGET).exe $(FLOPPY_DIR)/subsys/$(TARGET).exe
+TARGET_CFLAGS = -D__NTAPP__
 
+TARGET_OBJECTS = $(TARGET_NAME).o init.o smapi.o
 
-dist: $(DIST_DIR)/subsys/$(TARGET).exe
+include $(PATH_TO_TOP)/rules.mak
 
-$(DIST_DIR)/subsys/$(TARGET).exe: $(TARGET).exe
-       $(CP) $(TARGET).exe ../../$(DIST_DIR)/subsys/$(TARGET).exe
+include $(TOOLS_PATH)/helper.mk
 
-include ../../rules.mak
+# EOF
index d466f09..5012b99 100644 (file)
@@ -1,35 +1,19 @@
-# $Id: makefile,v 1.1 2001/07/24 10:18:05 ekohl Exp $
-#
-# Local Security Authority Subsystem
-#
-# ReactOS Operating System
-#
-TARGET=lsass
+# $Id: makefile,v 1.2 2001/08/21 20:13:04 chorns Exp $
 
-BASE_CFLAGS = -I../../include
+PATH_TO_TOP = ../../..
 
-OBJECTS = $(TARGET).o init.o $(TARGET).coff
+TARGET_TYPE = program
 
-LIBS = ../../lib/ntdll/ntdll.a
+TARGET_APPTYPE = native
 
-all: $(TARGET).exe
+TARGET_NAME = lsass
 
-.phony: all
+TARGET_INSTALLDIR = system32
 
-clean:
-       - $(RM) $(TARGET).o $(TARGET).exe $(TARGET).sym $(TARGET).coff
+TARGET_OBJECTS = $(TARGET_NAME).o init.o
 
-.phony: clean
+include $(PATH_TO_TOP)/rules.mak
 
-$(TARGET).coff: $(TARGET).rc
-       $(RC) $(TARGET).rc $(TARGET).coff
+include $(TOOLS_PATH)/helper.mk
 
-$(TARGET).exe: $(OBJECTS) $(LIBS)
-       $(LD) \
-               $(OBJECTS) \
-               $(LIBS) \
-               -o $(TARGET).exe \
-               --subsystem native
-       $(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
-
-include ../../rules.mak
+# EOF
index e5f334a..32589af 100644 (file)
@@ -1,43 +1,21 @@
-# $Id: makefile,v 1.2 2001/07/15 21:18:53 rex Exp $
-#
-# Services: Service control manager (SCM)
-#
-# ReactOS Operating System
-#
-TARGET = services
-PROGS = services.exe
+# $Id: makefile,v 1.3 2001/08/21 20:13:04 chorns Exp $
 
 PATH_TO_TOP = ../../..
 
-OBJECTS = services.o services.coff
-LIBS = ../../../lib/kernel32/kernel32.a ../../../lib/ntdll/ntdll.a
-CLEAN_FILES = services.o services.coff services.exe services.sym
+TARGET_TYPE = program
 
-BASE_CFLAGS = -I../../../include
+TARGET_APPTYPE = console
 
-all: services.exe
+TARGET_NAME = services
 
-$(TARGET).coff: $(TARGET).rc
-       $(RC) $(TARGET).rc $(TARGET).coff
+TARGET_INSTALLDIR = system32
 
-$(TARGET).exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o $(TARGET).exe
-       $(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
+TARGET_SDKLIBS = ntdll.a kernel32.a
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-.phony: clean 
-
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
-
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-
-dist: $(PROGS:%=../../../$(DIST_DIR)/apps/%)
-
-$(PROGS:%=../../../$(DIST_DIR)/apps/%): ../../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
 
-include $(PATH_TO_TOP)/rules.mak
+# EOF
index 7be1415..30b77c0 100644 (file)
@@ -1,43 +1,21 @@
-# $Id: makefile,v 1.4 2001/07/15 21:18:53 rex Exp $
-#
-# Shell: Simple shell application
-#
-# ReactOS Operating System
-#
-TARGET = shell
-PROGS = shell.exe
+# $Id: makefile,v 1.5 2001/08/21 20:13:04 chorns Exp $
 
 PATH_TO_TOP = ../../..
 
-OBJECTS= shell.o shell.coff
-LIBS= ../../../lib/kernel32/kernel32.a ../../../lib/ntdll/ntdll.a
-CLEAN_FILES= shell.o shell.coff shell.exe shell.sym
+TARGET_TYPE = program
 
-BASE_CFLAGS = -I../../../include
+TARGET_APPTYPE = console
 
-all: shell.exe
+TARGET_NAME = shell
 
-shell.exe: $(OBJECTS) $(LIBS)
-       $(CC) $(OBJECTS) $(LIBS) -o shell.exe
-       $(NM) --numeric-sort shell.exe > shell.sym
+TARGET_INSTALLDIR = system32
 
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.phony: clean 
-
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
-
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-
-dist: $(PROGS:%=../../../$(DIST_DIR)/apps/%)
-
-$(PROGS:%=../../../$(DIST_DIR)/apps/%): ../../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../../$(DIST_DIR)/apps/$*
+TARGET_SDKLIBS = ntdll.a kernel32.a
 
+TARGET_OBJECTS = $(TARGET_NAME).o
 
 include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
 
-
+# EOF
index a1e182a..92ee92c 100644 (file)
@@ -1,54 +1,21 @@
-# $Id: makefile,v 1.4 2001/07/15 21:18:53 rex Exp $
-#
-# Logon/login Application
-#
-# ReactOS Operating System
-#
-TARGET = winlogon
-PROGS = winlogon.exe
+# $Id: makefile,v 1.5 2001/08/21 20:13:05 chorns Exp $
 
 PATH_TO_TOP = ../../..
 
-BASE_CFLAGS = -I../../include
+TARGET_TYPE = program
 
-OBJECTS = winlogon.o $(TARGET).coff
+TARGET_APPTYPE = console
 
-LIBS = $(PATH_TO_TOP)/lib/kernel32/kernel32.a \
-       $(PATH_TO_TOP)/lib/ntdll/ntdll.a \
-       $(PATH_TO_TOP)/lib/user32/user32.a
+TARGET_NAME = winlogon
 
-all: $(TARGET).exe
+TARGET_INSTALLDIR = system32
 
-.phony: all
+TARGET_SDKLIBS = ntdll.a kernel32.a user32.a
 
-clean:
-       - $(RM) *.o $(TARGET).exe $(TARGET).sym $(TARGET).coff
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-.phony: clean
-
-$(TARGET).exe: $(OBJECTS)
-       $(CC) \
-               $(OBJECTS) \
-               $(LIBS) \
-               -o $(TARGET).exe 
-       $(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
-
-clean: $(CLEAN_FILES:%=%_clean)
-
-$(CLEAN_FILES:%=%_clean): %_clean:
-       - $(RM) $*
-
-.phony: clean $(CLEAN_FILES:%=%_clean)
-
-install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
-
-$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
-       $(CP) $* $(FLOPPY_DIR)/apps/$*
-
-dist: $(PROGS:%=../../../$(DIST_DIR)/apps/%)
-
-$(PROGS:%=../../../$(DIST_DIR)/apps/%): ../../../$(DIST_DIR)/apps/%: %
-       $(CP) $* ../../../$(DIST_DIR)/apps/$*
+include $(PATH_TO_TOP)/rules.mak
 
+include $(TOOLS_PATH)/helper.mk
 
-include $(PATH_TO_TOP)/rules.mak
+# EOF
index b409f05..484d025 100644 (file)
@@ -1,21 +1,25 @@
-# $Id: makefile,v 1.38 2001/08/02 20:22:24 phreak Exp $
-#
-# WIN32K.SYS build spec
-#
+# $Id: makefile,v 1.39 2001/08/21 20:13:17 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-TARGET=win32k
+TARGET_TYPE = export_driver
+
+TARGET_NAME = win32k
+
+TARGET_BASE = 0x0
+
+TARGET_ENTRY = _DllMain@8
 
 # from atheos appserver makefile
 COPTS   = -pipe -O3 -I./freetype/include -c -Wall
 
-CFLAGS = -D__NTDRIVER__ -I. -I$(PATH_TO_TOP)/ntoskrnl/include -DUNICODE
+TARGET_CFLAGS = -I$(PATH_TO_TOP)/ntoskrnl/include -DUNICODE
 
 #define FT_FLAT_COMPILE
 
 ENG_OBJECTS= eng/debug.o eng/mem.o eng/brush.o eng/bitblt.o eng/clip.o eng/copybits.o \
-                eng/device.o eng/handle.o eng/lineto.o eng/paint.o eng/palette.o \
-               eng/surface.o eng/xlate.o eng/transblt.o eng/mouse.o
+    eng/device.o eng/handle.o eng/lineto.o eng/paint.o eng/palette.o \
+    eng/surface.o eng/xlate.o eng/transblt.o eng/mouse.o
 MAIN_OBJECTS = main/dllmain.o
 MISC_OBJECTS = misc/driver.o misc/error.o misc/math.o misc/object.o
 LDR_OBJECTS = ldr/loader.o
@@ -35,87 +39,27 @@ FREETYPE_OBJECTS = freetype/grfont.o freetype/ctype.o \
        freetype/ftglyph.o freetype/ftmm.o freetype/autohint.o freetype/cff.o \
        freetype/type1cid.o freetype/psnames.o freetype/raster1.o freetype/sfnt.o \
        freetype/smooth.o freetype/truetype.o freetype/winfnt.o freetype/type1z.o
-RESOURCE_OBJECT = $(TARGET).coff
 STUBS_OBJECTS = stubs/stubs.o
 
-OBJECTS = $(ENG_OBJECTS) $(MAIN_OBJECTS) $(MISC_OBJECTS) $(LDR_OBJECTS) \
-          $(NTUSER_OBJECTS) $(OBJECTS_OBJECTS) $(RESOURCE_OBJECT) \
-          $(STUBS_OBJECTS) $(MATH_OBJECTS) $(FLOAT_OBJECTS) \
-          $(FREETYPE_OBJECTS) $(DIB_OBJECTS)
-
-all: $(TARGET).sys
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-CLEAN_FILES = dib/*.o eng/*.o freetype/*.o ldr/*.o main/*.o misc/*.o ntuser/*.o  \
-              objects/*.o stubs/*.o  \
-              $(TARGET).coff $(TARGET).o $(TARGET).a  \
-              junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sym
-
-$(TARGET).sys: $(OBJECTS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).sys \
-               --def $(TARGET).def \
-               --output-lib $(TARGET).a \
-               --kill-at
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -e _DllMain@8 \
-               -o junk.tmp \
-               -Wl,--image-base,0x0 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $(TARGET).o \
-               ../../ntoskrnl/ntoskrnl.a
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).sys \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def $(TARGET).edf \
-               --kill-at
-       - $(RM) base.tmp
-       $(CC) \
-               -nostartfiles -nostdlib \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -e _DllMain@8 \
-               -o $(TARGET).sys \
-               $(TARGET).o \
-               ../../ntoskrnl/ntoskrnl.a \
-               -Wl,--image-base,0x0 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,temp.exp 
-              
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).sys > $(TARGET).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-
-dist: $(DIST_DIR)/drivers/$(TARGET).sys
-
-$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-       $(CP) $(TARGET).sys ../../$(DIST_DIR)/drivers/$(TARGET).sys
+TARGET_OBJECTS = \
+  $(ENG_OBJECTS) $(MAIN_OBJECTS) $(MISC_OBJECTS) $(LDR_OBJECTS) \
+  $(NTUSER_OBJECTS) $(OBJECTS_OBJECTS) $(STUBS_OBJECTS) \
+  $(MATH_OBJECTS) $(FLOAT_OBJECTS) $(FREETYPE_OBJECTS) $(DIB_OBJECTS)
+
+TARGET_CLEAN = \
+  dib/*.o \
+  eng/*.o \
+  freetype/*.o \
+  ldr/*.o \
+  main/*.o \
+  misc/*.o \
+  ntuser/*.o \
+  objects/*.o \
+  stubs/*.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
 
 .dummy:
 
@@ -126,7 +70,4 @@ etags: TAGS
 TAGS: main/TAGS eng/TAGS ldr/TAGS misc/TAGS objects/TAGS stubs/TAGS ntuser/TAGS dib/TAGS freetype/TAGS
        etags -i main/TAGS -i eng/TAGS -i ldr/TAGS -i misc/TAGS -i objects/TAGS -i stubs/TAGS -i ntuser/TAGS -i dib/TAGS -i freetype/TAGS
 
-#WITH_DEBUGGING = yes
-#WIN32_LEAN_AND_MEAN = yes
-#WARNINGS_ARE_ERRORS = yes
-include ../../rules.mak
+# EOF
diff --git a/reactos/tools/.cvsignore b/reactos/tools/.cvsignore
new file mode 100644 (file)
index 0000000..adb36c8
--- /dev/null
@@ -0,0 +1 @@
+*.exe
\ No newline at end of file
diff --git a/reactos/tools/Makefile b/reactos/tools/Makefile
new file mode 100644 (file)
index 0000000..41fc433
--- /dev/null
@@ -0,0 +1,60 @@
+PATH_TO_TOP = ..
+
+TOOLS = \
+  depends$(EXE_POSTFIX) \
+  rcopy$(EXE_POSTFIX) \
+  rdel$(EXE_POSTFIX) \
+  rmkdir$(EXE_POSTFIX) \
+  rrmdir$(EXE_POSTFIX)
+
+CLEAN_FILES = $(TOOLS)
+
+all: $(TOOLS)
+
+depends$(EXE_POSTFIX): depends.c
+       $(HOST_CC) $(CFLAGS) -o depends$(EXE_POSTFIX) depends.c
+
+ifeq ($(HOST),mingw32-linux)
+rcopy$(EXE_POSTFIX): rcopy.c
+       $(HOST_CC) $(CFLAGS) -DUNIX_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
+endif
+ifeq ($(HOST),mingw32-windows)
+rcopy$(EXE_POSTFIX): rcopy.c
+       $(HOST_CC) $(CFLAGS) -DDOS_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
+endif
+
+rdel$(EXE_POSTFIX): rdel.c
+       $(HOST_CC) $(CFLAGS) -liberty rdel.c -o rdel$(EXE_POSTFIX)
+
+ifeq ($(HOST),mingw32-linux)
+rmkdir$(EXE_POSTFIX): rmkdir.c
+       $(HOST_CC) $(CFLAGS) -DUNIX_PATHS rmkdir.c -o rmkdir$(EXE_POSTFIX)
+endif
+ifeq ($(HOST),mingw32-windows)
+rmkdir$(EXE_POSTFIX): rmkdir.c
+       $(HOST_CC) $(CFLAGS) -DDOS_PATHS rmkdir.c -o rmkdir$(EXE_POSTFIX)
+endif
+
+ifeq ($(HOST),mingw32-linux)
+rrmdir$(EXE_POSTFIX): rrmdir.c
+       $(HOST_CC) $(CFLAGS) -DUNIX_PATHS rrmdir.c -o rrmdir$(EXE_POSTFIX)
+endif
+ifeq ($(HOST),mingw32-windows)
+rrmdir$(EXE_POSTFIX): rrmdir.c
+       $(HOST_CC) $(CFLAGS) -DDOS_PATHS rrmdir.c -o rrmdir$(EXE_POSTFIX)
+endif
+
+ifeq ($(HOST),mingw32-linux)
+clean:
+       rm $(TOOLS)
+       rm mkconfig$(EXE_POSTFIX)
+endif
+ifeq ($(HOST),mingw32-windows)
+clean:
+       del $(TOOLS)
+       del mkconfig$(EXE_POSTFIX)
+endif
+
+.PHONY: all clean
+
+include $(PATH_TO_TOP)/rules.mak
diff --git a/reactos/tools/config.mk b/reactos/tools/config.mk
new file mode 100644 (file)
index 0000000..477e0d8
--- /dev/null
@@ -0,0 +1,36 @@
+# Global configuration
+
+#
+# Include details of the OS configuration
+#
+include $(PATH_TO_TOP)/config
+
+CONFIG :=
+
+ifeq ($(DBG), 1)
+CONFIG += DBG
+endif
+
+ifeq ($(KDBG), 1)
+CONFIG += KDBG
+endif
+
+ifeq ($(MP), 1)
+CONFIG += MP
+else
+CONFIG += UP
+endif
+
+ifeq ($(ACPI), 1)
+CONFIG += ACPI
+endif
+
+
+$(PATH_TO_TOP)/tools/mkconfig$(EXE_SUFFIX): $(PATH_TO_TOP)/tools/mkconfig.c
+       $(HOST_CC) -g -o $(PATH_TO_TOP)/tools/mkconfig$(EXE_SUFFIX) $(PATH_TO_TOP)/tools/mkconfig.c
+
+$(PATH_TO_TOP)/config: $(PATH_TO_TOP)/tools/mkconfig$(EXE_SUFFIX)
+       $(PATH_TO_TOP)/tools/mkconfig$(EXE_SUFFIX) $(PATH_TO_TOP)/include/roscfg.h$(CONFIG)
+
+$(PATH_TO_TOP)/include/roscfg.h: $(PATH_TO_TOP)/config
+       $(PATH_TO_TOP)/tools/mkconfig$(EXE_SUFFIX) $(PATH_TO_TOP)/include/roscfg.h$(CONFIG)
diff --git a/reactos/tools/depend.mk b/reactos/tools/depend.mk
new file mode 100644 (file)
index 0000000..9890c7e
--- /dev/null
@@ -0,0 +1,38 @@
+# Automatic dependancy tracking
+# Define $DEP_OBJECTS before this file is included
+# $DEP_OBJECTS contain a list of object files that are checked for dependancies
+
+DEP_FILTERED := $(filter-out ex/napi.% nt/zw.%, $(DEP_OBJECTS:.o=.d))
+DEP_FILES := $(join $(dir $(DEP_FILTERED)), $(addprefix ., $(notdir $(DEP_FILTERED))))
+
+
+ifneq ($(MAKECMDGOALS),clean)
+include $(DEP_FILES)
+endif
+
+
+ifeq ($(HOST),mingw32-linux)
+DEPENDS_PATH := $(PATH_TO_TOP)/tools
+endif
+
+ifeq ($(HOST),mingw32-windows)
+DEPENDS_PATH := $(subst /,\,$(PATH_TO_TOP))\tools
+endif
+
+.%.d: %.c $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
+       $(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
+
+.%.d: %.cc $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
+       $(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
+
+.%.d: %.cpp $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
+       $(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
+
+.%.d: %.s  $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
+       $(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
+
+.%.d: %.S  $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
+       $(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
+
+.%.d: %.asm $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
+       $(NASM_CMD) $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
diff --git a/reactos/tools/depends.c b/reactos/tools/depends.c
new file mode 100644 (file)
index 0000000..e15f4bf
--- /dev/null
@@ -0,0 +1,55 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main(int argc, char* argv[])
+{
+  char buf[512];
+  char ch;
+  unsigned int i;
+  char* dot;
+  char* prefix;
+  FILE* out;
+
+  if (argc != 3)
+    {
+      printf("Too few arguments\n");
+      return(1);
+    }
+
+  prefix = strdup(argv[1]);
+  
+  out = fopen(argv[2], "wb");
+  if (out == NULL)
+    {
+      printf("Unable to open output file\n");
+      return(1);
+    }
+
+  i = 0;
+  while ((ch = fgetc(stdin)) != ':' && ch != EOF)
+    {
+      buf[i] = ch;
+      i++;
+    }
+  buf[i] = 0;
+  
+  if (i == 0)
+    {
+      return(0);
+    }
+
+  dot = strrchr(buf, '.');
+  if (dot != NULL)
+    {
+      *dot = 0;
+    }
+  fprintf(out, "%s/.%s.d %s/%s.o:", prefix, buf, prefix,buf);
+
+  while ((ch = fgetc(stdin)) != EOF)
+    {
+      fputc(ch, out);
+    }
+
+  return(0);
+}
diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk
new file mode 100644 (file)
index 0000000..629740a
--- /dev/null
@@ -0,0 +1,527 @@
+# $Id: helper.mk,v 1.1 2001/08/21 20:13:17 chorns Exp $
+#
+# Helper makefile for ReactOS modules
+# Variables this makefile accepts:
+#   $TARGET_TYPE       = Type of target:
+#                        program = User mode program
+#                        proglib = Executable program that have exported functions
+#                        dynlink = Dynamic Link Library (DLL)
+#                        library = Import library that will be linked with other code
+#                        driver_library = Import library for a driver
+#                        driver = Kernel mode driver
+#                        export_driver = Kernel mode driver that have exported functions
+#                        hal = Hardware Abstraction Layer
+#                        bootpgm = Boot program
+#                        miniport = Kernel mode driver that does not link with ntoskrnl.exe or hal.dll
+#                        gdi_driver = Kernel mode graphics driver that link with win32k.sys
+#   $TARGET_APPTYPE    = Application type (windows,native,console)
+#   $TARGET_NAME       = Base name of output file and .rc, .def, and .edf files
+#   $TARGET_OBJECTS    = Object files that compose the module
+#   $TARGET_HEADERS    = Header files that the object files depend on (optional)
+#   $TARGET_DEFNAME    = Base name of .def and .edf files (optional)
+#   $TARGET_BASENAME   = Base name of output file (overrides $TARGET_NAME if it exists) (optional)
+#   $TARGET_EXTENSION  = Extesion of the output file (optional)
+#   $TARGET_DDKLIBS    = DDK libraries that are to be imported by the module (optional)
+#   $TARGET_SDKLIBS    = SDK libraries that are to be imported by the module (optional)
+#   $TARGET_LIBS       = Other libraries that are to be imported by the module (optional)
+#   $TARGET_GCCLIBS    = GCC libraries imported with -l (optional)
+#   $TARGET_LFLAGS     = GCC flags when linking (optional)
+#   $TARGET_CFLAGS     = GCC flags (optional)
+#   $TARGET_CPPFLAGS   = G++ flags (optional)
+#   $TARGET_ASFLAGS    = GCC assembler flags (optional)
+#   $TARGET_NFLAGS     = NASM flags (optional)
+#   $TARGET_CLEAN      = Files that are part of the clean rule (optional)
+#   $TARGET_PATH       = Relative path for *.def, *.edf, and *.rc (optional)
+#   $TARGET_BASE       = Default base address (optional)
+#   $TARGET_ENTRY      = Entry point (optional)
+#   $TARGET_DEFONLY    = Use .def instead of .edf extension (no,yes) (optional)
+#   $TARGET_NORC       = Do not include standard resource file (no,yes) (optional)
+#   $TARGET_LIBPATH    = Destination path for import libraries (optional)
+#   $TARGET_INSTALLDIR = Destination path when installed (optional)
+
+ifeq ($(TARGET_PATH),)
+TARGET_PATH := .
+endif
+
+
+# FIXME: MK_DEFENTRY may not be correct
+ifeq ($(TARGET_TYPE),program)
+  MK_MODE := user
+  MK_EXETYPE := exe
+  MK_DEFEXT := .exe
+  MK_DEFENTRY := _DEFINE_TARGET_APPTYPE
+  MK_DDKLIBS :=
+  MK_SDKLIBS :=
+  MK_CFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_CPPFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_IMPLIB := no
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH :=
+  MK_INSTALLDIR := bin
+  MK_DISTDIR := apps
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),proglib)
+  MK_MODE := user
+  MK_EXETYPE := dll
+  MK_DEFEXT := .exe
+  MK_DEFENTRY := _WinMain@16
+  MK_DDKLIBS :=
+  MK_SDKLIBS :=
+  MK_CFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_CPPFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_IMPLIB := yes
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH := $(SDK_PATH_LIB)
+  MK_INSTALLDIR := bin
+  MK_DISTDIR := apps
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),dynlink)
+  MK_MODE := user
+  MK_EXETYPE := dll
+  MK_DEFEXT := .dll
+  MK_DEFENTRY := _DllMain@12
+  MK_DDKLIBS :=
+  MK_SDKLIBS :=
+  MK_CFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_CPPFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_IMPLIB := yes
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH := $(SDK_PATH_LIB)
+  MK_INSTALLDIR := system32
+  MK_DISTDIR := dlls
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),library)
+  MK_MODE := user
+  MK_EXETYPE := dll
+  MK_DEFEXT := .a
+  MK_DEFENTRY :=
+  MK_DDKLIBS :=
+  MK_SDKLIBS :=
+  MK_CFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_CPPFLAGS := -I./ -I$(SDK_PATH_INC)
+  MK_IMPLIB := no
+  MK_IMPLIBONLY := yes
+  MK_IMPLIBDEFPATH := $(SDK_PATH_LIB)
+  MK_INSTALLDIR := $(SDK_PATH_INC)
+  MK_DISTDIR := # FIXME
+  MK_RESOURCE := 
+endif
+
+ifeq ($(TARGET_TYPE),driver_library)
+  MK_MODE := kernel
+  MK_EXETYPE := dll
+  MK_DEFEXT := .dll
+  MK_DEFENTRY :=
+  MK_DDKLIBS :=
+  MK_SDKLIBS :=
+  MK_CFLAGS := -I./ -I$(DDK_PATH_INC)
+  MK_CPPFLAGS := -I./ -I$(DDK_PATH_INC)
+  MK_IMPLIB := no
+  MK_IMPLIBONLY := yes
+  MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
+  MK_INSTALLDIR := $(DDK_PATH_INC)
+  MK_DISTDIR := # FIXME
+  MK_RESOURCE :=
+endif
+
+ifeq ($(TARGET_TYPE),driver)
+  MK_MODE := kernel
+  MK_EXETYPE := dll
+  MK_DEFEXT := .sys
+  MK_DEFENTRY := _DriverEntry@8
+  MK_DDKLIBS := ntoskrnl.a hal.a
+  MK_SDKLIBS :=
+  MK_CFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_CPPFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_IMPLIB := no
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH :=
+  MK_INSTALLDIR := system32/drivers
+  MK_DISTDIR := drivers
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),export_driver)
+  MK_MODE := kernel
+  MK_EXETYPE := dll
+  MK_DEFEXT := .sys
+  MK_DEFENTRY := _DriverEntry@8
+  MK_DDKLIBS := ntoskrnl.a hal.a
+  MK_SDKLIBS :=
+  MK_CFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_CPPFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_IMPLIB := yes
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
+  MK_INSTALLDIR := system32/drivers
+  MK_DISTDIR := drivers
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),hal)
+  MK_MODE := kernel
+  MK_EXETYPE := dll
+  MK_DEFEXT := .dll
+  MK_DEFENTRY := _DriverEntry@8
+  MK_DDKLIBS := ntoskrnl.a
+  MK_SDKLIBS :=
+  MK_CFLAGS := -D__NTHAL__ -I./ -I$(DDK_PATH_INC)
+  MK_CPPFLAGS := -D__NTHAL__ -I./ -I$(DDK_PATH_INC)
+  MK_IMPLIB := yes
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH :=
+  MK_INSTALLDIR := system32
+  MK_DISTDIR := dlls
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),bootpgm)
+  MK_MODE := kernel
+  MK_EXETYPE := exe
+  MK_DEFEXT := .exe
+  MK_DEFENTRY := _DriverEntry@8
+  MK_DDKLIBS :=
+  MK_SDKLIBS :=
+  MK_CFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_CPPFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_IMPLIB := no
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH :=
+  MK_INSTALLDIR := system32
+  MK_DISTDIR := # FIXME
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),miniport)
+  MK_MODE := kernel
+  MK_EXETYPE := dll
+  MK_DEFEXT := .sys
+  MK_DEFENTRY := _DriverEntry@8
+  MK_DDKLIBS :=
+  MK_SDKLIBS :=
+  MK_CFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_CPPFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_IMPLIB := no
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH :=
+  MK_INSTALLDIR := system32/drivers
+  MK_DISTDIR := drivers
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+ifeq ($(TARGET_TYPE),gdi_driver)
+  MK_MODE := kernel
+  MK_EXETYPE := dll
+  MK_DEFEXT := .dll
+  MK_DEFENTRY := _DriverEntry@8
+  MK_DDKLIBS := ntoskrnl.a hal.a win32k.a
+  MK_SDKLIBS :=
+  MK_CFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_CPPFLAGS := -D__NTDRIVER__ -I./ -I$(DDK_PATH_INC)
+  MK_IMPLIB := yes
+  MK_IMPLIBONLY := no
+  MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
+  MK_INSTALLDIR := system32/drivers
+  MK_DISTDIR := drivers
+  MK_RESOURCE := $(TARGET_PATH)/$(TARGET_NAME).coff
+endif
+
+
+ifeq ($(TARGET_TYPE),program)
+  ifeq ($(TARGET_APPTYPE),windows)
+    MK_DEFENTRY := _WinMainCRTStartup@16
+    MK_SDKLIBS :=
+    TARGET_LFLAGS += -Wl,--subsystem,windows
+  endif
+
+  ifeq ($(TARGET_APPTYPE),native)
+    MK_DEFENTRY := _NtProcessStartup
+    MK_SDKLIBS := ntdll.a
+    TARGET_LFLAGS += -Wl,--subsystem,native -nostartfiles
+  endif
+
+  ifeq ($(TARGET_APPTYPE),console)
+    MK_DEFENTRY := _mainCRTStartup
+    MK_SDKLIBS := msvcrt.a
+    TARGET_LFLAGS += -Wl,--subsystem,console
+  endif
+endif
+
+
+ifneq ($(TARGET_INSTALLDIR),)
+  MK_INSTALLDIR := $(TARGET_INSTALLDIR)
+endif
+
+
+ifeq ($(TARGET_LIBPATH),)
+  MK_IMPLIBPATH := $(MK_IMPLIBDEFPATH)
+else
+  MK_IMPLIBPATH := $(TARGET_LIBPATH)
+endif
+
+
+ifeq ($(TARGET_BASENAME),)
+  MK_BASENAME := $(TARGET_NAME)
+else
+  MK_BASENAME := $(TARGET_BASENAME)
+endif
+
+
+ifeq ($(TARGET_EXTENSION),)
+  MK_EXT := $(MK_DEFEXT)
+else
+  MK_EXT := $(TARGET_EXTENSION)
+endif
+
+
+ifeq ($(TARGET_NORC),yes)
+  MK_RESOURCE :=
+endif
+
+
+ifeq ($(TARGET_DEFNAME),)
+  MK_DEFBASE := $(TARGET_NAME)
+else
+  MK_DEFBASE := $(TARGET_DEFNAME)
+endif
+
+MK_DEFNAME := $(TARGET_PATH)/$(MK_DEFBASE).def
+ifeq ($(TARGET_DEFONLY),yes)
+  MK_EDFNAME := $(MK_DEFNAME)
+else
+  MK_EDFNAME := $(TARGET_PATH)/$(MK_DEFBASE).edf
+endif
+
+
+ifeq ($(MK_MODE),user)
+  MK_DEFBASE := 0x400000
+  MK_LIBS := $(addprefix $(SDK_PATH_LIB)/, $(MK_SDKLIBS) $(TARGET_SDKLIBS))
+endif
+
+ifeq ($(MK_MODE),kernel)
+  MK_DEFBASE := 0x10000
+  MK_LIBS := $(addprefix $(DDK_PATH_LIB)/, $(MK_DDKLIBS) $(TARGET_DDKLIBS))
+endif
+
+