mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Add bootcd target. (BOOTCD_INSTALL): Set for bootcd install. * rules.mak (TOPDIR): Define on windows. (BOOTCD_DIR): Define. (RLINE): Define. * apps/tests/lpc/makefile: Handle BOOTCD_INSTALL. * apps/tests/mstest/Makefile: Ditto. * apps/tests/nptest/Makefile: Ditto. * apps/tests/shm/makefile: Ditto. * ntoskrnl/Makefile: Handle BOOTCD_INSTALL. Add bootcd target. * drivers/dd/vga/makefile: Add bootcd target. * drivers/dd/blue/makefile (TARGET_BOOTSTRAP): Define as yes. * drivers/dd/floppy/Makefile: Ditto. * drivers/fs/cdfs/makefile: Ditto. * drivers/fs/ntfs/makefile: Ditto. * drivers/fs/vfat/makefile: Ditto. * drivers/input/keyboard/makefile: Ditto. * drivers/storage/atapi/makefile: Ditto. * drivers/storage/cdrom/makefile: Ditto. * drivers/storage/class2/makefile: Ditto. * drivers/storage/disk/makefile: Ditto. * drivers/storage/scsiport/makefile: Ditto. * hal/halx86/Makefile: Ditto. * lib/ntdll/makefile: Ditto. * subsys/system/usetup/makefile (TARGET_BOOTSTRAP): Define as yes. (TARGET_BOOTSTRAP_NAME): Define as smss.exe. * tools/Makefile: Add rline executable. * tools/helper.mk: Support bootcd targets. * tools/rline.c: New file. svn path=/trunk/; revision=4494
This commit is contained in:
parent
e174c6dcd5
commit
7b1020a10e
26 changed files with 453 additions and 38 deletions
|
@ -1,3 +1,35 @@
|
|||
2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile: Add bootcd target.
|
||||
(BOOTCD_INSTALL): Set for bootcd install.
|
||||
* rules.mak (TOPDIR): Define on windows.
|
||||
(BOOTCD_DIR): Define.
|
||||
(RLINE): Define.
|
||||
* apps/tests/lpc/makefile: Handle BOOTCD_INSTALL.
|
||||
* apps/tests/mstest/Makefile: Ditto.
|
||||
* apps/tests/nptest/Makefile: Ditto.
|
||||
* apps/tests/shm/makefile: Ditto.
|
||||
* ntoskrnl/Makefile: Handle BOOTCD_INSTALL. Add bootcd target.
|
||||
* drivers/dd/vga/makefile: Add bootcd target.
|
||||
* drivers/dd/blue/makefile (TARGET_BOOTSTRAP): Define as yes.
|
||||
* drivers/dd/floppy/Makefile: Ditto.
|
||||
* drivers/fs/cdfs/makefile: Ditto.
|
||||
* drivers/fs/ntfs/makefile: Ditto.
|
||||
* drivers/fs/vfat/makefile: Ditto.
|
||||
* drivers/input/keyboard/makefile: Ditto.
|
||||
* drivers/storage/atapi/makefile: Ditto.
|
||||
* drivers/storage/cdrom/makefile: Ditto.
|
||||
* drivers/storage/class2/makefile: Ditto.
|
||||
* drivers/storage/disk/makefile: Ditto.
|
||||
* drivers/storage/scsiport/makefile: Ditto.
|
||||
* hal/halx86/Makefile: Ditto.
|
||||
* lib/ntdll/makefile: Ditto.
|
||||
* subsys/system/usetup/makefile (TARGET_BOOTSTRAP): Define as yes.
|
||||
(TARGET_BOOTSTRAP_NAME): Define as smss.exe.
|
||||
* tools/Makefile: Add rline executable.
|
||||
* tools/helper.mk: Support bootcd targets.
|
||||
* tools/rline.c: New file.
|
||||
|
||||
2003-04-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/freetype/builds/compiler/gcc.mk (CC): Comment out; use CC from
|
||||
|
|
119
reactos/Makefile
119
reactos/Makefile
|
@ -137,7 +137,23 @@ dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
|
|||
$(NET_APPS:%=%_dist) \
|
||||
$(APPS:%=%_dist) $(EXT_MODULES:%=%_dist)
|
||||
|
||||
.PHONY: all depends implib clean clean_before install dist
|
||||
bootcd_directory_layout:
|
||||
$(RMKDIR) $(BOOTCD_DIR)
|
||||
$(RMKDIR) $(BOOTCD_DIR)/bootdisk
|
||||
$(RMKDIR) $(BOOTCD_DIR)/install
|
||||
$(RMKDIR) $(BOOTCD_DIR)/reactos
|
||||
$(RMKDIR) $(BOOTCD_DIR)/reactos/system32
|
||||
$(RMKDIR) $(BOOTCD_DIR)/loader
|
||||
|
||||
bootcd_bootstrap_files: $(COMPONENTS:%=%_bootcd) $(HALS:%=%_bootcd) $(BUS:%=%_bootcd) \
|
||||
$(DLLS:%=%_bootcd) $(KERNEL_DRIVERS:%=%_bootcd) $(SUBSYS:%=%_bootcd) \
|
||||
$(SYS_APPS:%=%_bootcd)
|
||||
|
||||
bootcd: all bootcd_directory_layout bootcd_bootstrap_files
|
||||
make install INSTALL_DIR=$(BOOTCD_DIR)/install INSTALL_SYMBOLS=no BOOTCD_INSTALL=yes
|
||||
|
||||
.PHONY: all depends implib clean clean_before install dist bootcd_directory_layout \
|
||||
bootcd_bootstrap_files bootcd
|
||||
|
||||
|
||||
#
|
||||
|
@ -158,7 +174,10 @@ $(SYS_APPS:%=%_dist): %_dist:
|
|||
$(SYS_APPS:%=%_install): %_install:
|
||||
$(MAKE) -C subsys/system/$* install
|
||||
|
||||
.PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_dist)
|
||||
$(SYS_APPS:%=%_bootcd): %_bootcd:
|
||||
make -C subsys/system/$* bootcd
|
||||
|
||||
.PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_dist) $(SYS_APPS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# System Services
|
||||
|
@ -305,6 +324,8 @@ iface_native_install:
|
|||
|
||||
iface_native_dist:
|
||||
|
||||
iface_native_bootcd:
|
||||
|
||||
iface_additional:
|
||||
$(MAKE) -C iface/addsys
|
||||
|
||||
|
@ -317,10 +338,12 @@ iface_additional_install:
|
|||
|
||||
iface_additional_dist:
|
||||
|
||||
iface_additional_bootcd:
|
||||
|
||||
.PHONY: iface_native iface_native_implib iface_native_clean iface_native_install \
|
||||
iface_native_dist \
|
||||
iface_native_dist iface_native_bootcd \
|
||||
iface_additional iface_additional_implib iface_additional_clean \
|
||||
iface_additional_install iface_additional_dist
|
||||
iface_additional_install iface_additional_dist iface_additional_bootcd
|
||||
|
||||
#
|
||||
# Bus driver rules
|
||||
|
@ -340,8 +363,11 @@ $(BUS:%=%_install): %_install:
|
|||
$(BUS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/bus/$* dist
|
||||
|
||||
$(BUS:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/bus/$* bootcd
|
||||
|
||||
.PHONY: $(BUS) $(BUS:%=%_implib) $(BUS:%=%_clean) \
|
||||
$(BUS:%=%_install) $(BUS:%=%_dist)
|
||||
$(BUS:%=%_install) $(BUS:%=%_dist) $(BUS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Driver support libraries rules
|
||||
|
@ -361,8 +387,11 @@ $(DRIVERS_LIB:%=%_install): %_install:
|
|||
$(DRIVERS_LIB:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/lib/$* dist
|
||||
|
||||
$(DRIVERS_LIB:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/lib/$* bootcd
|
||||
|
||||
.PHONY: $(DRIVERS_LIB) $(DRIVERS_LIB:%=%_implib) $(DRIVERS_LIB:%=%_clean) \
|
||||
$(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_dist)
|
||||
$(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_dist) $(DRIVERS_LIB:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Device driver rules
|
||||
|
@ -382,8 +411,11 @@ $(DEVICE_DRIVERS:%=%_install): %_install:
|
|||
$(DEVICE_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/dd/$* dist
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/dd/$* bootcd
|
||||
|
||||
.PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_implib) $(DEVICE_DRIVERS:%=%_clean) \
|
||||
$(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist)
|
||||
$(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist) $(DEVICE_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Input driver rules
|
||||
|
@ -403,8 +435,11 @@ $(INPUT_DRIVERS:%=%_install): %_install:
|
|||
$(INPUT_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/input/$* dist
|
||||
|
||||
$(INPUT_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/input/$* bootcd
|
||||
|
||||
.PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_clean)\
|
||||
$(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_dist)
|
||||
$(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_dist) $(INPUT_DRIVERS:%=%_bootcd)
|
||||
|
||||
$(FS_DRIVERS): %:
|
||||
$(MAKE) -C drivers/fs/$*
|
||||
|
@ -421,8 +456,11 @@ $(FS_DRIVERS:%=%_install): %_install:
|
|||
$(FS_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/fs/$* dist
|
||||
|
||||
$(FS_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/fs/$* bootcd
|
||||
|
||||
.PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_implib) $(FS_DRIVERS:%=%_clean) \
|
||||
$(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_dist)
|
||||
$(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_dist) $(FS_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Network driver rules
|
||||
|
@ -442,8 +480,11 @@ $(NET_DRIVERS:%=%_install): %_install:
|
|||
$(NET_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/net/$* dist
|
||||
|
||||
$(NET_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/net/$* bootcd
|
||||
|
||||
.PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_implib) $(NET_DRIVERS:%=%_clean) \
|
||||
$(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_dist)
|
||||
$(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_dist) $(NET_DRIVERS:%=%_bootcd)
|
||||
|
||||
$(NET_DEVICE_DRIVERS): %:
|
||||
$(MAKE) -C drivers/net/dd/$*
|
||||
|
@ -460,8 +501,11 @@ $(NET_DEVICE_DRIVERS:%=%_install): %_install:
|
|||
$(NET_DEVICE_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/net/dd/$* dist
|
||||
|
||||
$(NET_DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/net/dd/$* bootcd
|
||||
|
||||
.PHONY: $(NET_DEVICE_DRIVERS) $(NET_DEVICE_DRIVERS:%=%_clean) $(NET_DEVICE_DRIVERS:%=%_implib) \
|
||||
$(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist)
|
||||
$(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist) $(NET_DEVICE_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# storage driver rules
|
||||
|
@ -481,8 +525,11 @@ $(STORAGE_DRIVERS:%=%_install): %_install:
|
|||
$(STORAGE_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/storage/$* dist
|
||||
|
||||
.PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) \
|
||||
$(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_dist)
|
||||
$(STORAGE_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
make -C drivers/storage/$* bootcd
|
||||
|
||||
.PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) $(STORAGE_DRIVERS:%=%_implib) \
|
||||
$(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_dist) $(STORAGE_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Kernel loaders
|
||||
|
@ -524,7 +571,10 @@ ntoskrnl_install:
|
|||
ntoskrnl_dist:
|
||||
$(MAKE) -C ntoskrnl dist
|
||||
|
||||
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_dist
|
||||
ntoskrnl_bootcd:
|
||||
make -C ntoskrnl bootcd
|
||||
|
||||
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_dist ntoskrnl_bootcd
|
||||
|
||||
#
|
||||
# Hardware Abstraction Layer import library
|
||||
|
@ -545,7 +595,10 @@ hallib_install:
|
|||
hallib_dist:
|
||||
$(MAKE) -C hal/hal dist
|
||||
|
||||
.PHONY: hallib hallib_implib hallib_clean hallib_install hallib_dist
|
||||
hallib_bootcd:
|
||||
make -C hal/hal bootcd
|
||||
|
||||
.PHONY: hallib hallib_implib hallib_clean hallib_install hallib_dist hallib_bootcd
|
||||
|
||||
#
|
||||
# Hardware Abstraction Layers
|
||||
|
@ -566,7 +619,10 @@ $(HALS:%=%_install): %_install:
|
|||
$(HALS:%=%_dist): %_dist:
|
||||
$(MAKE) -C hal/$* dist
|
||||
|
||||
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist)
|
||||
$(HALS:%=%_bootcd): %_bootcd:
|
||||
make -C hal/$* bootcd
|
||||
|
||||
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist) $(HALS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Required DLLs
|
||||
|
@ -590,7 +646,10 @@ $(DLLS:%=%_install): %_install:
|
|||
$(DLLS:%=%_dist): %_dist:
|
||||
$(MAKE) -C lib/$* dist
|
||||
|
||||
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist)
|
||||
$(DLLS:%=%_bootcd): %_bootcd:
|
||||
make -C lib/$* bootcd
|
||||
|
||||
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist) $(DLLS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Subsystem support modules
|
||||
|
@ -614,8 +673,11 @@ $(SUBSYS:%=%_install): %_install:
|
|||
$(SUBSYS:%=%_dist): %_dist:
|
||||
$(MAKE) -C subsys/$* dist
|
||||
|
||||
$(SUBSYS:%=%_bootcd): %_bootcd:
|
||||
make -C subsys/$* bootcd
|
||||
|
||||
.PHONY: $(SUBSYS) $(SUBSYS:%=%_depends) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) \
|
||||
$(SUBSYS:%=%_dist)
|
||||
$(SUBSYS:%=%_dist) $(SUBSYS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Create an installation
|
||||
|
@ -640,6 +702,25 @@ install_clean:
|
|||
$(RMDIR) $(INSTALL_DIR)/bin
|
||||
$(RMDIR) $(INSTALL_DIR)
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install_dirs:
|
||||
$(RMKDIR) $(INSTALL_DIR)
|
||||
|
||||
install_before:
|
||||
#$(CP) bootdata/autorun.inf $(INSTALL_DIR)/../autorun.inf
|
||||
$(CP) bootdata/readme.txt $(INSTALL_DIR)/../readme.txt
|
||||
$(RLINE) bootdata/hivecls.inf $(INSTALL_DIR)/hivecls.inf
|
||||
$(RLINE) bootdata/hivedef.inf $(INSTALL_DIR)/hivedef.inf
|
||||
$(RLINE) bootdata/hivesft.inf $(INSTALL_DIR)/hivesft.inf
|
||||
$(RLINE) bootdata/hivesys.inf $(INSTALL_DIR)/hivesys.inf
|
||||
$(RLINE) bootdata/txtsetup.sif $(INSTALL_DIR)/txtsetup.sif
|
||||
$(CP) system.hiv $(INSTALL_DIR)/system.hiv
|
||||
$(CP) media/fonts/helb____.ttf $(INSTALL_DIR)/helb____.ttf
|
||||
$(CP) media/fonts/timr____.ttf $(INSTALL_DIR)/timr____.ttf
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install_dirs:
|
||||
$(RMKDIR) $(INSTALL_DIR)
|
||||
$(RMKDIR) $(INSTALL_DIR)/bin
|
||||
|
@ -658,6 +739,8 @@ install_before:
|
|||
$(CP) media/fonts/helb____.ttf $(INSTALL_DIR)/media/fonts/helb____.ttf
|
||||
$(CP) media/fonts/timr____.ttf $(INSTALL_DIR)/media/fonts/timr____.ttf
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
.PHONY: install_clean install_dirs install_before
|
||||
|
||||
|
||||
|
|
|
@ -26,11 +26,22 @@ clean:
|
|||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
|
|
@ -26,11 +26,22 @@ clean:
|
|||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
|
|
@ -25,11 +25,22 @@ clean:
|
|||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
|
|
@ -26,11 +26,22 @@ clean:
|
|||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.19 2001/08/21 20:13:10 chorns Exp $
|
||||
# $Id: makefile,v 1.20 2003/04/05 09:37:41 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = blue
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: Makefile,v 1.10 2001/08/21 20:13:10 chorns Exp $
|
||||
# $Id: Makefile,v 1.11 2003/04/05 09:37:42 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = floppy
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.11 2003/02/28 22:51:17 gvg Exp $
|
||||
# $Id: makefile,v 1.12 2003/04/05 09:37:42 chorns Exp $
|
||||
#
|
||||
#
|
||||
all:
|
||||
|
@ -20,3 +20,7 @@ dist:
|
|||
install:
|
||||
$(MAKE) -C display install
|
||||
$(MAKE) -C miniport install
|
||||
|
||||
bootcd:
|
||||
$(MAKE) -C display bootcd
|
||||
$(MAKE) -C miniport bootcd
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.4 2002/09/09 17:27:14 hbirr Exp $
|
||||
# $Id: makefile,v 1.5 2003/04/05 09:37:42 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = cdfs
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.2 2002/07/15 15:37:33 ekohl Exp $
|
||||
# $Id: makefile,v 1.3 2003/04/05 09:37:42 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = ntfs
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.41 2003/02/09 18:02:56 hbirr Exp $
|
||||
# $Id: makefile,v 1.42 2003/04/05 09:37:42 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = vfatfs
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.7 2001/08/21 20:13:13 chorns Exp $
|
||||
# $Id: makefile,v 1.8 2003/04/05 09:37:43 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = keyboard
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.1 2001/09/09 21:31:13 ekohl Exp $
|
||||
# $Id: makefile,v 1.2 2003/04/05 09:37:43 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = atapi
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.1 2002/01/31 15:00:00 ekohl Exp $
|
||||
# $Id: makefile,v 1.2 2003/04/05 09:37:43 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = cdrom
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.3 2001/08/21 20:13:16 chorns Exp $
|
||||
# $Id: makefile,v 1.4 2003/04/05 09:37:43 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = export_driver
|
||||
|
||||
TARGET_NAME = class2
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.2 2001/08/21 20:13:16 chorns Exp $
|
||||
# $Id: makefile,v 1.3 2003/04/05 09:37:43 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = driver
|
||||
|
||||
TARGET_NAME = disk
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.4 2001/08/21 20:13:16 chorns Exp $
|
||||
# $Id: makefile,v 1.5 2003/04/05 09:37:44 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = export_driver
|
||||
|
||||
TARGET_NAME = scsiport
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.7 2003/02/26 14:14:03 ekohl Exp $
|
||||
# $Id: Makefile,v 1.8 2003/04/05 09:37:44 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -14,6 +14,8 @@ include $(PATH_TO_TOP)/rules.mak
|
|||
#
|
||||
include $(TOOLS_PATH)/config.mk
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = hal
|
||||
|
||||
TARGET_BASENAME = hal
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# $Id: makefile,v 1.79 2003/04/02 21:55:15 hyperion Exp $
|
||||
# $Id: makefile,v 1.80 2003/04/05 09:37:44 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_TYPE = dynlink
|
||||
|
||||
TARGET_NAME = ntdll
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.92 2003/04/01 18:58:59 ekohl Exp $
|
||||
# $Id: Makefile,v 1.93 2003/04/05 09:37:44 chorns Exp $
|
||||
#
|
||||
# ReactOS Operating System
|
||||
#
|
||||
|
@ -670,6 +670,15 @@ clean:
|
|||
|
||||
.PHONY: clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: all $(INSTALL_DIR)/$(TARGETNAME).exe
|
||||
|
||||
$(INSTALL_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
|
||||
$(CP) $(TARGETNAME).exe $(INSTALL_DIR)/$(TARGETNAME).exe
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: all $(INSTALL_DIR)/system32/$(TARGETNAME).exe $(INSTALL_DIR)/symbols/$(TARGETNAME).sym
|
||||
|
||||
$(INSTALL_DIR)/system32/$(TARGETNAME).exe: $(TARGETNAME).exe
|
||||
|
@ -678,6 +687,9 @@ $(INSTALL_DIR)/system32/$(TARGETNAME).exe: $(TARGETNAME).exe
|
|||
$(INSTALL_DIR)/symbols/$(TARGETNAME).sym: $(TARGETNAME).sym
|
||||
$(CP) $(TARGETNAME).sym $(INSTALL_DIR)/symbols/$(TARGETNAME).sym
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
|
||||
.PHONY: install
|
||||
|
||||
dist: $(DIST_DIR)/$(TARGETNAME).exe
|
||||
|
@ -687,6 +699,14 @@ $(DIST_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
|
|||
|
||||
.PHONY: dist
|
||||
|
||||
bootcd: all $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe
|
||||
|
||||
$(BOOTCD_DIR)/reactos/$(TARGETNAME).exe: $(TARGETNAME).exe
|
||||
$(CP) $(TARGETNAME).exe $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe
|
||||
|
||||
.PHONY: bootcd
|
||||
|
||||
|
||||
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
|
||||
|
|
|
@ -18,8 +18,12 @@ endif
|
|||
|
||||
ifeq ($(HOST),mingw32-linux)
|
||||
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
|
||||
else
|
||||
TOPDIR := $(shell cd)
|
||||
endif
|
||||
|
||||
TOPDIR := $(TOPDIR)/$(PATH_TO_TOP)
|
||||
|
||||
#
|
||||
# Choose various options
|
||||
#
|
||||
|
@ -60,6 +64,8 @@ INSTALL_DIR = $(PATH_TO_TOP)/reactos
|
|||
DIST_DIR = $(PATH_TO_TOP)/dist
|
||||
# endif
|
||||
|
||||
# Directory to build a bootable CD image in
|
||||
BOOTCD_DIR=$(TOPDIR)/../bootcd/disk
|
||||
|
||||
CC = $(PREFIX)gcc
|
||||
CXX = $(PREFIX)g++
|
||||
|
@ -79,6 +85,7 @@ OBJCOPY = $(PREFIX)objcopy
|
|||
TOOLS_PATH = $(PATH_TO_TOP)/tools
|
||||
CP = $(TOOLS_PATH)/rcopy
|
||||
RM = $(TOOLS_PATH)/rdel
|
||||
RLINE = $(TOOLS_PATH)/rline
|
||||
RMDIR = $(TOOLS_PATH)/rrmdir
|
||||
RMKDIR = $(TOOLS_PATH)/rmkdir
|
||||
RSYM = $(TOOLS_PATH)/rsym
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
# $Id: makefile,v 1.9 2003/03/13 09:51:11 ekohl Exp $
|
||||
# $Id: makefile,v 1.10 2003/04/05 09:37:44 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_BOOTSTRAP = yes
|
||||
|
||||
TARGET_BOOTSTRAP_NAME = smss.exe
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = native
|
||||
|
|
|
@ -5,6 +5,7 @@ TOOLS = \
|
|||
depends$(EXE_POSTFIX) \
|
||||
rcopy$(EXE_POSTFIX) \
|
||||
rdel$(EXE_POSTFIX) \
|
||||
rline$(EXE_POSTFIX) \
|
||||
rmkdir$(EXE_POSTFIX) \
|
||||
rrmdir$(EXE_POSTFIX) \
|
||||
rsym$(EXE_POSTFIX) \
|
||||
|
@ -33,6 +34,15 @@ endif
|
|||
rdel$(EXE_POSTFIX): rdel.c
|
||||
$(HOST_CC) $(CFLAGS) rdel.c -o rdel$(EXE_POSTFIX)
|
||||
|
||||
ifeq ($(HOST),mingw32-linux)
|
||||
rline$(EXE_POSTFIX): rline.c
|
||||
$(HOST_CC) $(CFLAGS) -DUNIX_PATHS rline.c -o rline$(EXE_POSTFIX)
|
||||
endif
|
||||
ifeq ($(HOST),mingw32-windows)
|
||||
rline$(EXE_POSTFIX): rmkdir.c
|
||||
$(HOST_CC) $(CFLAGS) -DDOS_PATHS rline.c -o rline$(EXE_POSTFIX)
|
||||
endif
|
||||
|
||||
ifeq ($(HOST),mingw32-linux)
|
||||
rmkdir$(EXE_POSTFIX): rmkdir.c
|
||||
$(HOST_CC) $(CFLAGS) -DUNIX_PATHS rmkdir.c -o rmkdir$(EXE_POSTFIX)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: helper.mk,v 1.29 2003/04/02 21:55:16 hyperion Exp $
|
||||
# $Id: helper.mk,v 1.30 2003/04/05 09:37:45 chorns Exp $
|
||||
#
|
||||
# Helper makefile for ReactOS modules
|
||||
# Variables this makefile accepts:
|
||||
|
@ -22,7 +22,7 @@
|
|||
# $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_EXTENSION = Extension 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)
|
||||
|
@ -42,6 +42,8 @@
|
|||
# $TARGET_LIBPATH = Destination path for import libraries (optional)
|
||||
# $TARGET_INSTALLDIR = Destination path when installed (optional)
|
||||
# $TARGET_PCH = Filename of header to use to generate a PCH if supported by the compiler (optional)
|
||||
# $TARGET_BOOTSTRAP = Wether this file is needed to bootstrap the installation (no,yes) (optional)
|
||||
# $TARGET_BOOTSTRAP_NAME = Name on the installation medium (optional)
|
||||
# $WINE_MODE = Compile using WINE headers (no,yes) (optional)
|
||||
# $WINE_RC = Name of .rc file for WINE modules (optional)
|
||||
|
||||
|
@ -94,6 +96,7 @@ endif
|
|||
MK_IMPLIBDEFPATH :=
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := bin
|
||||
MK_BOOTCDDIR := system32
|
||||
MK_DISTDIR := apps
|
||||
ifeq ($(WINE_RC),)
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
|
@ -117,6 +120,7 @@ ifeq ($(TARGET_TYPE),proglib)
|
|||
MK_IMPLIBDEFPATH := $(SDK_PATH_LIB)
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := bin
|
||||
MK_BOOTCDDIR := system32
|
||||
MK_DISTDIR := apps
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
endif
|
||||
|
@ -142,6 +146,7 @@ endif
|
|||
MK_IMPLIBDEFPATH := $(SDK_PATH_LIB)
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := system32
|
||||
MK_BOOTCDDIR := system32
|
||||
MK_DISTDIR := dlls
|
||||
ifeq ($(WINE_RC),)
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
|
@ -165,6 +170,7 @@ ifeq ($(TARGET_TYPE),library)
|
|||
MK_IMPLIBDEFPATH :=
|
||||
MK_IMPLIB_EXT :=
|
||||
MK_INSTALLDIR := system32
|
||||
MK_BOOTCDDIR := system32
|
||||
MK_DISTDIR := # FIXME
|
||||
MK_RES_BASE :=
|
||||
endif
|
||||
|
@ -184,6 +190,7 @@ ifeq ($(TARGET_TYPE),driver_library)
|
|||
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := $(DDK_PATH_INC)
|
||||
MK_BOOTCDDIR := .
|
||||
MK_DISTDIR := # FIXME
|
||||
MK_RES_BASE :=
|
||||
endif
|
||||
|
@ -203,6 +210,7 @@ ifeq ($(TARGET_TYPE),driver)
|
|||
MK_IMPLIBDEFPATH :=
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := system32/drivers
|
||||
MK_BOOTCDDIR := .
|
||||
MK_DISTDIR := drivers
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
endif
|
||||
|
@ -222,6 +230,7 @@ ifeq ($(TARGET_TYPE),export_driver)
|
|||
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := system32/drivers
|
||||
MK_BOOTCDDIR := .
|
||||
MK_DISTDIR := drivers
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
endif
|
||||
|
@ -241,6 +250,7 @@ ifeq ($(TARGET_TYPE),hal)
|
|||
MK_IMPLIBDEFPATH :=
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := system32
|
||||
MK_BOOTCDDIR := .
|
||||
MK_DISTDIR := dlls
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
endif
|
||||
|
@ -260,6 +270,7 @@ ifeq ($(TARGET_TYPE),bootpgm)
|
|||
MK_IMPLIBDEFPATH :=
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := system32
|
||||
MK_BOOTCDDIR := system32
|
||||
MK_DISTDIR := # FIXME
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
endif
|
||||
|
@ -279,6 +290,7 @@ ifeq ($(TARGET_TYPE),miniport)
|
|||
MK_IMPLIBDEFPATH :=
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := system32/drivers
|
||||
MK_BOOTCDDIR := .
|
||||
MK_DISTDIR := drivers
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
endif
|
||||
|
@ -298,6 +310,7 @@ ifeq ($(TARGET_TYPE),gdi_driver)
|
|||
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
|
||||
MK_IMPLIB_EXT := .a
|
||||
MK_INSTALLDIR := system32
|
||||
MK_BOOTCDDIR := .
|
||||
MK_DISTDIR := dlls
|
||||
MK_RES_BASE := $(TARGET_NAME)
|
||||
endif
|
||||
|
@ -390,6 +403,11 @@ ifneq ($(TARGET_INSTALLDIR),)
|
|||
endif
|
||||
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
MK_INSTALLDIR := .
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(TARGET_LIBPATH),)
|
||||
MK_IMPLIBPATH := $(MK_IMPLIBDEFPATH)
|
||||
else
|
||||
|
@ -666,7 +684,7 @@ ifneq ($(TARGET_HEADERS),)
|
|||
$(TARGET_OBJECTS): $(TARGET_HEADERS)
|
||||
endif
|
||||
|
||||
# install and dist rules
|
||||
# install, dist and bootcd rules
|
||||
|
||||
ifeq ($(MK_IMPLIBONLY),yes)
|
||||
|
||||
|
@ -676,15 +694,25 @@ install:
|
|||
|
||||
dist:
|
||||
|
||||
bootcd:
|
||||
|
||||
else # MK_IMPLIBONLY
|
||||
|
||||
|
||||
install: $(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_FULLNAME)
|
||||
|
||||
ifeq ($(INSTALL_SYMBOLS),no)
|
||||
|
||||
$(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_FULLNAME):
|
||||
$(CP) $(MK_FULLNAME) $(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_FULLNAME)
|
||||
|
||||
else # INSTALL_SYMBOLS
|
||||
|
||||
$(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_FULLNAME): $(MK_FULLNAME) $(MK_BASENAME).sym
|
||||
$(CP) $(MK_FULLNAME) $(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_FULLNAME)
|
||||
$(CP) $(MK_BASENAME).sym $(INSTALL_DIR)/symbols/$(MK_BASENAME).sym
|
||||
|
||||
endif # INSTALL_SYMBOLS
|
||||
|
||||
dist: $(DIST_DIR)/$(MK_DISTDIR)/$(MK_FULLNAME)
|
||||
|
||||
|
@ -692,10 +720,30 @@ $(DIST_DIR)/$(MK_DISTDIR)/$(MK_FULLNAME): $(MK_FULLNAME)
|
|||
$(CP) $(MK_FULLNAME) $(DIST_DIR)/$(MK_DISTDIR)/$(MK_FULLNAME)
|
||||
$(CP) $(MK_BASENAME).sym $(DIST_DIR)/symbols/$(MK_BASENAME).sym
|
||||
|
||||
# Bootstrap files for the bootable CD
|
||||
ifeq ($(TARGET_BOOTSTRAP),yes)
|
||||
|
||||
ifneq ($(TARGET_BOOTSTRAP_NAME),)
|
||||
MK_BOOTSTRAP_NAME := $(TARGET_BOOTSTRAP_NAME)
|
||||
else # TARGET_BOOTSTRAP_NAME
|
||||
MK_BOOTSTRAP_NAME := $(MK_FULLNAME)
|
||||
endif # TARGET_BOOTSTRAP_NAME
|
||||
|
||||
bootcd: $(BOOTCD_DIR)/reactos/$(MK_BOOTCDDIR)/$(MK_BOOTSTRAP_NAME)
|
||||
|
||||
$(BOOTCD_DIR)/reactos/$(MK_BOOTCDDIR)/$(MK_BOOTSTRAP_NAME):
|
||||
$(CP) $(MK_FULLNAME) $(BOOTCD_DIR)/reactos/$(MK_BOOTCDDIR)/$(MK_BOOTSTRAP_NAME)
|
||||
|
||||
else # TARGET_BOOTSTRAP
|
||||
|
||||
bootcd:
|
||||
|
||||
endif # TARGET_BOOTSTRAP
|
||||
|
||||
endif # MK_IMPLIBONLY
|
||||
|
||||
|
||||
.phony: all depends implib clean install dist depends
|
||||
.phony: all depends implib clean install dist bootcd depends
|
||||
|
||||
|
||||
# Precompiled header support
|
||||
|
|
137
reactos/tools/rline.c
Executable file
137
reactos/tools/rline.c
Executable file
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* Copy a text file with end-of-line character transformation (EOL)
|
||||
*
|
||||
* Usage: rline input-file output-file
|
||||
*/
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
char* convert_path(char* origpath)
|
||||
{
|
||||
char* newpath;
|
||||
int i;
|
||||
|
||||
newpath = strdup(origpath);
|
||||
|
||||
i = 0;
|
||||
while (newpath[i] != 0)
|
||||
{
|
||||
#ifdef UNIX_PATHS
|
||||
if (newpath[i] == '\\')
|
||||
{
|
||||
newpath[i] = '/';
|
||||
}
|
||||
#else
|
||||
#ifdef DOS_PATHS
|
||||
if (newpath[i] == '/')
|
||||
{
|
||||
newpath[i] = '\\';
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
i++;
|
||||
}
|
||||
return(newpath);
|
||||
}
|
||||
|
||||
int
|
||||
fsize (FILE * f)
|
||||
{
|
||||
struct stat st;
|
||||
int fh = fileno (f);
|
||||
|
||||
if (fh < 0 || fstat (fh, &st) < 0)
|
||||
return -1;
|
||||
return (int) st.st_size;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char* path1;
|
||||
char* path2;
|
||||
FILE* in;
|
||||
FILE* out;
|
||||
char* in_buf;
|
||||
char* out_buf;
|
||||
int in_size;
|
||||
int in_ptr;
|
||||
int linelen;
|
||||
int n_in;
|
||||
int n_out;
|
||||
char eol_buf[2];
|
||||
|
||||
/* Terminate the line with windows EOL characters (CRLF) */
|
||||
eol_buf[0] = '\r';
|
||||
eol_buf[1] = '\n';
|
||||
|
||||
if (argc != 3)
|
||||
{
|
||||
fprintf(stderr, "Wrong argument count\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
path1 = convert_path(argv[1]);
|
||||
path2 = convert_path(argv[2]);
|
||||
|
||||
in = fopen(path1, "rb");
|
||||
if (in == NULL)
|
||||
{
|
||||
perror("Cannot open input file");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
in_size = fsize(in);
|
||||
in_buf = malloc(in_size);
|
||||
if (in_buf == NULL)
|
||||
{
|
||||
perror("Not enough free memory");
|
||||
fclose(in);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
out = fopen(path2, "wb");
|
||||
if (out == NULL)
|
||||
{
|
||||
perror("Cannot open output file");
|
||||
fclose(in);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Read it all in */
|
||||
n_in = fread(in_buf, 1, in_size, in);
|
||||
|
||||
in_ptr = 0;
|
||||
while (in_ptr < in_size)
|
||||
{
|
||||
linelen = 0;
|
||||
|
||||
while ((in_ptr + linelen < in_size) && (in_buf[in_ptr + linelen] != '\r') && (in_buf[in_ptr + linelen] != '\n'))
|
||||
{
|
||||
linelen++;
|
||||
}
|
||||
if (linelen > 0)
|
||||
{
|
||||
n_out = fwrite(&in_buf[in_ptr], 1, linelen, out);
|
||||
in_ptr += linelen;
|
||||
}
|
||||
/* Terminate the line */
|
||||
n_out = fwrite(&eol_buf[0], 1, sizeof(eol_buf), out);
|
||||
|
||||
if ((in_ptr < in_size) && (in_buf[in_ptr] == '\r'))
|
||||
{
|
||||
in_ptr++;
|
||||
}
|
||||
|
||||
if ((in_ptr < in_size) && (in_buf[in_ptr] == '\n'))
|
||||
{
|
||||
in_ptr++;
|
||||
}
|
||||
}
|
||||
|
||||
free(in_buf);
|
||||
fclose(in);
|
||||
|
||||
exit(0);
|
||||
}
|
Loading…
Reference in a new issue