diff --git a/freeldr/CHANGELOG b/freeldr/CHANGELOG index 2300ad733c9..ad5687bbe4b 100644 --- a/freeldr/CHANGELOG +++ b/freeldr/CHANGELOG @@ -1,3 +1,11 @@ +Changes in v1.2.1 (5/3/2002) + +- Makefile updates +- Optimized the Makefile +- Removed recursive make functionality (builds much faster now) +- Places all output into one single directory +- Added automagically generated dependencies + Changes in v1.2 (4/30/2002) - All Linux kernels are supported (zImage & bzImage, loaded high & low) diff --git a/freeldr/freeldr/Makefile b/freeldr/freeldr/Makefile index 049fd1b0861..6882935097d 100644 --- a/freeldr/freeldr/Makefile +++ b/freeldr/freeldr/Makefile @@ -17,110 +17,248 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # -include rules.mk -# asmcode.o has to be first in the link line because it contains the startup code -#OBJS = asmcode.a asmcode.o mb.o boot.o freeldr.o rtl.o fs.a fs.o fat.o \ -# reactos.o tui.o menu.o miscboot.o options.o linux.o multiboot.o arcname.o \ -# mem.o memory.o debug.o parseini.o registry.o import.o -#ASM_OBJS = asmcode.o mb.o boot.o mem.o -OBJS = freeldr.o miscboot.o options.o linux.o multiboot.o debug.o oslist.o version.o -LIBS = arch rtl fs ui reactos comm disk mm cache inifile -LIB_FILES = arch/arch.a rtl/rtl.a fs/fs.a ui/ui.a reactos/reactos.a -LIB_FILES2 = comm/comm.a disk/disk.a mm/mm.a cache/cache.a inifile/inifile.a +############################################# +# CHANGE THESE FOR YOUR OUTPUT +# +TARGET = i386 +DEBUG = 1 # Debugging information on (bigger binary) +#DEBUG = 0 # Debugging information off (smaller binary) + +OBJDIR = obj +OUTPUT_DIR = $(OBJDIR)/$(TARGET) + +############################################# +# COMPILER AND LINKER PROGRAMS +# +CC = gcc +LD = ld +AR = ar +RM = cmd /C del +CP = cmd /C copy +MKDIR = cmd /C md +RMDIR = cmd /C rd +MAKE = cmd /C make +NASM_CMD = nasm +OBJCOPY = objcopy +SED = $(SRCDIR)/../sed + +#----------------------------------------------------------------------------------------------------- +# TEST IF WE ARE IN THE TARGET DIRECTORY +# IF NOT WE WILL CHANGE TO THE TARGET DIRECTORY AND RUN MAKE FROM THERE +#----------------------------------------------------------------------------------------------------- +#ifeq (,$(filter $(CURDIR)/$(OUTPUT_DIR),$(notdir $(CURDIR)))) +ifneq ($(CURDIR), $(SRCDIR)/$(OUTPUT_DIR)) + +.SUFFIXES: + +############################################# +# VARIABLE TO CHANGE TO TARGET DIRECTORY AND INVOKE MAKE FROM THERE +# +MAKETARGET = $(MAKE) --no-print-directory -C $(OUTPUT_DIR) \ + -f ../../Makefile SRCDIR=$(CURDIR) $(MAKECMDGOALS) + +.PHONY: CHANGE_TO_TARGET +CHANGE_TO_TARGET: $(OBJDIR) $(OBJDIR)/$(TARGET) + +@$(MAKETARGET) > nul +# If you are compiling on a linux box you can remove the above "> nul" +# it is only there because Microsoft likes to print its version string +# during my make and I don't like it to print it's version string + +$(OBJDIR): + @echo Creating directory: $(OBJDIR) + @$(MKDIR) $(OBJDIR) + +$(OBJDIR)/$(TARGET): $(OBJDIR) + @echo Creating directory: $(OBJDIR)\$(TARGET) + @$(MKDIR) $(OBJDIR)\$(TARGET) + +Makefile : ; + +% :: CHANGE_TO_TARGET + +############################################# .PHONY : clean - -all: freeldr.sys - -freeldr.sys: c_code.a end.o -# $(LD) -N -Ttext=0x8000 --oformat=binary -s -o freeldr.sys c_code.a end.o - $(LD) -N -Ttext=0x8000 -s -o freeldr.exe c_code.a end.o - $(OBJCOPY) -O binary freeldr.exe freeldr.sys - -freeldr.exe: asmcode.a c_code.a - $(LD) -o freeldr.exe asmcode.a c_code.a - -c_code.a: $(LIBS) c_code1.a c_code2.a - $(LD) -r -o c_code.a $(LIB_FILES) c_code1.a c_code2.a - -c_code1.a: $(LIBS) - $(LD) -r -o c_code1.a $(LIB_FILES2) - -c_code2.a: $(OBJS) - $(LD) -r -o c_code2.a $(OBJS) - -freeldr.o: freeldr.c freeldr.h rtl.h fs.h reactos.h ui.h arch.h miscboot.h - $(CC) $(FLAGS) -o freeldr.o -c freeldr.c - -miscboot.o: miscboot.c freeldr.h arch.h rtl.h fs.h ui.h miscboot.h - $(CC) $(FLAGS) -o miscboot.o -c miscboot.c - -options.o: options.c freeldr.h rtl.h ui.h options.h - $(CC) $(FLAGS) -o options.o -c options.c - -linux.o: linux.c freeldr.h rtl.h ui.h linux.h - $(CC) $(FLAGS) -o linux.o -c linux.c - -multiboot.o: multiboot.c freeldr.h rtl.h fs.h multiboot.h ui.h - $(CC) $(FLAGS) -o multiboot.o -c multiboot.c - -debug.o: debug.c debug.h - $(CC) $(FLAGS) -o debug.o -c debug.c - -oslist.o: oslist.c oslist.h - $(CC) $(FLAGS) -o oslist.o -c oslist.c - -version.o: version.c version.h - $(CC) $(FLAGS) -o version.o -c version.c - -end.o: end.S - $(CC) $(FLAGS) -o end.o -c end.S - -arch: - $(MAKE) -C arch - -rtl: - $(MAKE) -C rtl - -fs: - $(MAKE) -C fs - -ui: - $(MAKE) -C ui - -reactos: - $(MAKE) -C reactos - -comm: - $(MAKE) -C comm - -disk: - $(MAKE) -C disk - -mm: - $(MAKE) -C mm - -cache: - $(MAKE) -C cache - -inifile: - $(MAKE) -C inifile - -.PHONY : $(LIBS) - clean: - - $(RM) *.o - - $(RM) *.a - - $(RM) *.exe - - $(RM) *.sys - $(MAKE) -C arch clean - $(MAKE) -C reactos clean - $(MAKE) -C comm clean - $(MAKE) -C disk clean - $(MAKE) -C mm clean - $(MAKE) -C ui clean - $(MAKE) -C fs clean - $(MAKE) -C rtl clean - $(MAKE) -C cache clean - $(MAKE) -C inifile clean + @echo Cleaning directory $(OBJDIR)\$(TARGET) + @-$(RM) /Q $(OBJDIR)\$(TARGET)\*.* + @echo Removing directory $(OBJDIR)\$(TARGET) + @-$(RMDIR) $(OBJDIR)\$(TARGET) + @-$(RMDIR) $(OBJDIR) + @echo Clean ALL done. + +############################################# + +#----------------------------------------------------------------------------------------------------- +# END MAGIC TARGET DIRECTORY CHANGE STUFF +#----------------------------------------------------------------------------------------------------- +else + +############################################# +# COMPILER COMMAND LINE OPTIONS +# +COMPILER_OPTIONS = -Wall -nostdlib -nostdinc -fno-builtin -O3 -MD + +############################################# +# COMPILER DEFINES +# +ifeq ($(DEBUG),1) +COMPILER_DEFINES = -DDEBUG +else +COMPILERS_DEFINES = +endif + +############################################# +# INCLUDE DIRECTORY OPTIONS +# +COMPILER_INCLUDES = -I$(SRCDIR)/include + +############################################# +# COMPILER FLAGS +# +CFLAGS = $(COMPILER_OPTIONS) \ + $(COMPILER_DEFINES) \ + $(COMPILER_INCLUDES) + +############################################# +# LINKER COMMAND LINE OPTIONS +# +#LINKER_OPTIONS = -N -Ttext=0x8000 --oformat=binary -s +LINKER_OPTIONS = -N -Ttext=0x8000 -s + +############################################# +# LINKERS FLAGS +# +LFLAGS = $(LINKER_OPTIONS) + +############################################# +# LIST ALL THE OBJECT FILE GROUPS +# +# fathelp.o must come first in the link line because it contains bootsector helper code +# arch.o must come second in the link line because it contains the startup code +# end.o must come last in the link line +ARCH_OBJS = fathelp.o \ + arch.o \ + boot.o \ + linux.o \ + mb.o \ + mem.o \ + diskint13.o + +RTL_OBJS = memory.o \ + print.o \ + stdlib.o \ + string.o \ + list.o + +FS_OBJS = fs.o \ + fat.o \ + iso.o + +UI_OBJS = tui.o \ + menu.o + +REACTOS_OBJS= reactos.o \ + arcname.o \ + hwdetect.o \ + reghive.o \ + registry.o + +COMM_OBJS = rs232.o \ + portio.o + +DISK_OBJS = disk.o \ + geometry.o \ + partition.o + +MM_OBJS = mm.o \ + mm_init.o + +CACHE_OBJS = cache.o \ + blocklist.o + +INIFILE_OBJS= inifile.o \ + ini_init.o \ + parse.o + +FREELDR_OBJS= freeldr.o \ + miscboot.o \ + options.o \ + linuxboot.o \ + multiboot.o \ + debug.o \ + oslist.o \ + version.o \ + end.o # Must come last in the link line + +############################################# +# ALL THE OBJECTS +# +OBJS = $(ARCH_OBJS) \ + $(RTL_OBJS) \ + $(FS_OBJS) \ + $(UI_OBJS) \ + $(REACTOS_OBJS) \ + $(COMM_OBJS) \ + $(DISK_OBJS) \ + $(MM_OBJS) \ + $(CACHE_OBJS) \ + $(INIFILE_OBJS) \ + $(FREELDR_OBJS) + +############################################# +# SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES +# +VPATH = $(SRCDIR)/ \ + $(SRCDIR)/arch/$(TARGET) \ + $(SRCDIR)/rtl \ + $(SRCDIR)/fs \ + $(SRCDIR)/ui \ + $(SRCDIR)/reactos \ + $(SRCDIR)/comm \ + $(SRCDIR)/disk \ + $(SRCDIR)/mm \ + $(SRCDIR)/cache \ + $(SRCDIR)/inifile \ + $(SRCDIR)/include + +############################################# + +all : freeldr.sys + @echo Make ALL done. + +############################################# + +freeldr.sys : $(OBJS) + @echo ===================================================== LINKING $@ +# @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o freeldr.sys $(OBJS) + @$(LD) $(LFLAGS) -o freeldr.exe $(OBJS) + @$(OBJCOPY) -O binary freeldr.exe freeldr.sys + +############################################# + +%.o :: %.c + @echo ===================================================== Compiling $* + @$(CC) $(CFLAGS) -o $@ -c $< + @$(SED) -e "s/\($*\)\.o[ :]*/\1.o $*.dep : /g" < $*.d > $*.dep +# @$(SED) -e "s/#.*//" -e "s/^[^:]*: *//" -e "s/ *\\$$//" -e "/^$$/ d" -e "s/$$/ :/" < $*.d >> $*.P + +%.o :: %.S + @echo ===================================================== Assembling $* + @$(CC) $(CFLAGS) -o $@ -c $< + @$(SED) -e "s/\($*\)\.o[ :]*/\1.o $*.dep : /g" < $*.d > $*.dep +# @$(SED) -e "s/#.*//" -e "s/^[^:]*: *//" -e "s/ *\\$$//" -e "/^$$/ d" -e "s/$$/ :/" < $*.d >> $*.P + +%.o :: %.asm + @echo ===================================================== Assembling $* + @$(NASM_CMD) -o $@ -f coff $< + +############################################# + +# Include the automagically generated dependencies +-include $(OBJS:%.o=%.dep) + +############################################# + +endif diff --git a/freeldr/freeldr/arch/Makefile b/freeldr/freeldr/arch/Makefile deleted file mode 100644 index 5baf058a7c8..00000000000 --- a/freeldr/freeldr/arch/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -TARGET = i386 - -OBJS = $(TARGET)/arch.S $(TARGET)/boot.S $(TARGET)/mb.S $(TARGET)/mem.S $(TARGET)/disk.S - -.PHONY : clean - -all: arch.a - -arch.a: $(OBJS) - $(MAKE) -C $(TARGET) - -clean: - - $(RM) *.a - $(MAKE) -C $(TARGET) clean diff --git a/freeldr/freeldr/arch/i386/Makefile b/freeldr/freeldr/arch/i386/Makefile deleted file mode 100644 index 437c97747cf..00000000000 --- a/freeldr/freeldr/arch/i386/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../../rules.mk - -OBJS = fathelp.o arch.o boot.o linux.o mb.o mem.o disk.o - -.PHONY : clean - -all: arch.a - -arch.a: $(OBJS) - $(LD) -r -o arch.a $(OBJS) - - $(RM) ..\arch.a - $(CP) arch.a ..\arch.a - -fathelp.o: fathelp.asm - $(NASM_CMD) -o fathelp.o -f coff fathelp.asm - -arch.o: arch.S - $(CC) $(FLAGS) -o arch.o -c arch.S - -boot.o: boot.S - $(CC) $(FLAGS) -o boot.o -c boot.S - -linux.o: linux.S - $(CC) $(FLAGS) -o linux.o -c linux.S - -mb.o: mb.S - $(CC) $(FLAGS) -o mb.o -c mb.S - -mem.o: mem.S - $(CC) $(FLAGS) -o mem.o -c mem.S - -disk.o: disk.S - $(CC) $(FLAGS) -o disk.o -c disk.S - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/arch/i386/disk.S b/freeldr/freeldr/arch/i386/diskint13.S similarity index 100% rename from freeldr/freeldr/arch/i386/disk.S rename to freeldr/freeldr/arch/i386/diskint13.S diff --git a/freeldr/freeldr/cache/Makefile b/freeldr/freeldr/cache/Makefile deleted file mode 100644 index 9b25a61bff6..00000000000 --- a/freeldr/freeldr/cache/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = cache.o blocklist.o - -.PHONY : clean - -all: cache.a - -cache.a: $(OBJS) - $(LD) -r -o cache.a $(OBJS) - -cache.o: cache.c cm.h - $(CC) $(FLAGS) -o cache.o -c cache.c - -blocklist.o: blocklist.c cm.h - $(CC) $(FLAGS) -o blocklist.o -c blocklist.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/comm/Makefile b/freeldr/freeldr/comm/Makefile deleted file mode 100644 index b543c4f3bfa..00000000000 --- a/freeldr/freeldr/comm/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = rs232.o portio.o - -.PHONY : clean - -all: comm.a - -comm.a: $(OBJS) - $(LD) -r -o comm.a $(OBJS) - -rs232.o: rs232.c ../comm.h - $(CC) $(FLAGS) -o rs232.o -c rs232.c - -portio.o: portio.c ../comm.h - $(CC) $(FLAGS) -o portio.o -c portio.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/disk/Makefile b/freeldr/freeldr/disk/Makefile deleted file mode 100644 index 2d918bb489c..00000000000 --- a/freeldr/freeldr/disk/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = disk.o geometry.o partition.o - -.PHONY : clean - -all: disk.a - -disk.a: $(OBJS) - $(LD) -r -o disk.a $(OBJS) - -disk.o: disk.c ../disk.h - $(CC) $(FLAGS) -o disk.o -c disk.c - -geometry.o: geometry.c ../disk.h - $(CC) $(FLAGS) -o geometry.o -c geometry.c - -partition.o: partition.c ../disk.h - $(CC) $(FLAGS) -o partition.o -c partition.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/fs/Makefile b/freeldr/freeldr/fs/Makefile deleted file mode 100644 index 35240262752..00000000000 --- a/freeldr/freeldr/fs/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = fs.o fat.o iso.o - -.PHONY : clean - -all: fs.a - -fs.a: $(OBJS) - $(LD) -r -o fs.a $(OBJS) - -fs.o: fs.c fat.h ../fs.h - $(CC) $(FLAGS) -o fs.o -c fs.c - -fat.o: fat.c fat.h ../fs.h - $(CC) $(FLAGS) -o fat.o -c fat.c - -iso.o: iso.c iso.h ../fs.h - $(CC) $(FLAGS) -o iso.o -c iso.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/arch.h b/freeldr/freeldr/include/arch.h similarity index 100% rename from freeldr/freeldr/arch.h rename to freeldr/freeldr/include/arch.h diff --git a/freeldr/freeldr/cache.h b/freeldr/freeldr/include/cache.h similarity index 100% rename from freeldr/freeldr/cache.h rename to freeldr/freeldr/include/cache.h diff --git a/freeldr/freeldr/comm.h b/freeldr/freeldr/include/comm.h similarity index 100% rename from freeldr/freeldr/comm.h rename to freeldr/freeldr/include/comm.h diff --git a/freeldr/freeldr/debug.h b/freeldr/freeldr/include/debug.h similarity index 100% rename from freeldr/freeldr/debug.h rename to freeldr/freeldr/include/debug.h diff --git a/freeldr/freeldr/disk.h b/freeldr/freeldr/include/disk.h similarity index 100% rename from freeldr/freeldr/disk.h rename to freeldr/freeldr/include/disk.h diff --git a/freeldr/freeldr/freeldr.h b/freeldr/freeldr/include/freeldr.h similarity index 100% rename from freeldr/freeldr/freeldr.h rename to freeldr/freeldr/include/freeldr.h diff --git a/freeldr/freeldr/fs.h b/freeldr/freeldr/include/fs.h similarity index 100% rename from freeldr/freeldr/fs.h rename to freeldr/freeldr/include/fs.h diff --git a/freeldr/freeldr/inifile.h b/freeldr/freeldr/include/inifile.h similarity index 100% rename from freeldr/freeldr/inifile.h rename to freeldr/freeldr/include/inifile.h diff --git a/freeldr/freeldr/linux.h b/freeldr/freeldr/include/linux.h similarity index 100% rename from freeldr/freeldr/linux.h rename to freeldr/freeldr/include/linux.h diff --git a/freeldr/freeldr/miscboot.h b/freeldr/freeldr/include/miscboot.h similarity index 100% rename from freeldr/freeldr/miscboot.h rename to freeldr/freeldr/include/miscboot.h diff --git a/freeldr/freeldr/mm.h b/freeldr/freeldr/include/mm.h similarity index 100% rename from freeldr/freeldr/mm.h rename to freeldr/freeldr/include/mm.h diff --git a/freeldr/freeldr/multiboot.h b/freeldr/freeldr/include/multiboot.h similarity index 100% rename from freeldr/freeldr/multiboot.h rename to freeldr/freeldr/include/multiboot.h diff --git a/freeldr/freeldr/options.h b/freeldr/freeldr/include/options.h similarity index 100% rename from freeldr/freeldr/options.h rename to freeldr/freeldr/include/options.h diff --git a/freeldr/freeldr/oslist.h b/freeldr/freeldr/include/oslist.h similarity index 100% rename from freeldr/freeldr/oslist.h rename to freeldr/freeldr/include/oslist.h diff --git a/freeldr/freeldr/reactos.h b/freeldr/freeldr/include/reactos.h similarity index 100% rename from freeldr/freeldr/reactos.h rename to freeldr/freeldr/include/reactos.h diff --git a/freeldr/freeldr/rtl.h b/freeldr/freeldr/include/rtl.h similarity index 100% rename from freeldr/freeldr/rtl.h rename to freeldr/freeldr/include/rtl.h diff --git a/freeldr/freeldr/ui.h b/freeldr/freeldr/include/ui.h similarity index 100% rename from freeldr/freeldr/ui.h rename to freeldr/freeldr/include/ui.h diff --git a/freeldr/freeldr/version.h b/freeldr/freeldr/include/version.h similarity index 94% rename from freeldr/freeldr/version.h rename to freeldr/freeldr/include/version.h index 4ba14d6b860..d43364a88c7 100644 --- a/freeldr/freeldr/version.h +++ b/freeldr/freeldr/include/version.h @@ -22,7 +22,7 @@ /* just some stuff */ -#define VERSION "FreeLoader v1.2" +#define VERSION "FreeLoader v1.2.1" #define COPYRIGHT "Copyright (C) 1998-2002 Brian Palmer " // FreeLoader version defines @@ -34,7 +34,7 @@ // #define FREELOADER_MAJOR_VERSION 1 #define FREELOADER_MINOR_VERSION 2 -#define FREELOADER_PATCH_VERSION 0 +#define FREELOADER_PATCH_VERSION 1 PUCHAR GetFreeLoaderVersionString(VOID); diff --git a/freeldr/freeldr/inifile/Makefile b/freeldr/freeldr/inifile/Makefile deleted file mode 100644 index 55309ff74c8..00000000000 --- a/freeldr/freeldr/inifile/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = inifile.o init.o parse.o - -.PHONY : clean - -all: inifile.a - -inifile.a: $(OBJS) - $(LD) -r -o inifile.a $(OBJS) - -inifile.o: inifile.c ../inifile.h - $(CC) $(FLAGS) -o inifile.o -c inifile.c - -init.o: init.c ../inifile.h - $(CC) $(FLAGS) -o init.o -c init.c - -parse.o: parse.c ../inifile.h - $(CC) $(FLAGS) -o parse.o -c parse.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/inifile/init.c b/freeldr/freeldr/inifile/ini_init.c similarity index 100% rename from freeldr/freeldr/inifile/init.c rename to freeldr/freeldr/inifile/ini_init.c diff --git a/freeldr/freeldr/linux.c b/freeldr/freeldr/linuxboot.c similarity index 100% rename from freeldr/freeldr/linux.c rename to freeldr/freeldr/linuxboot.c diff --git a/freeldr/freeldr/mm/Makefile b/freeldr/freeldr/mm/Makefile deleted file mode 100644 index 1e05a751c28..00000000000 --- a/freeldr/freeldr/mm/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = mm.o init.o - -.PHONY : clean - -all: mm.a - -mm.a: $(OBJS) - $(LD) -r -o mm.a $(OBJS) - -mm.o: mm.c ../mm.h mem.h - $(CC) $(FLAGS) -o mm.o -c mm.c - -init.o: init.c ../mm.h mem.h - $(CC) $(FLAGS) -o init.o -c init.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/mm/init.c b/freeldr/freeldr/mm/mm_init.c similarity index 100% rename from freeldr/freeldr/mm/init.c rename to freeldr/freeldr/mm/mm_init.c diff --git a/freeldr/freeldr/reactos/Makefile b/freeldr/freeldr/reactos/Makefile deleted file mode 100644 index 1206a5ea2dd..00000000000 --- a/freeldr/freeldr/reactos/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = reactos.o arcname.o hwdetect.o reghive.o registry.o - -.PHONY : clean - -all: reactos.a - -reactos.a: $(OBJS) - $(LD) -r -o reactos.a $(OBJS) - -reactos.o: reactos.c ../reactos.h - $(CC) $(FLAGS) -o reactos.o -c reactos.c - -arcname.o: arcname.c ../reactos.h - $(CC) $(FLAGS) -o arcname.o -c arcname.c - -hwdetect.o: hwdetect.c ../reactos.h - $(CC) $(FLAGS) -o hwdetect.o -c hwdetect.c - -reghive.o: reghive.c ../reactos.h - $(CC) $(FLAGS) -o reghive.o -c reghive.c - -registry.o: registry.c ../reactos.h - $(CC) $(FLAGS) -o registry.o -c registry.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/rtl/Makefile b/freeldr/freeldr/rtl/Makefile deleted file mode 100644 index 8b76b5d50b0..00000000000 --- a/freeldr/freeldr/rtl/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = memory.o print.o stdlib.o string.o list.o - -.PHONY : clean - -all: rtl.a - -rtl.a: $(OBJS) - $(LD) -r -o rtl.a $(OBJS) - -memory.o: memory.c ../rtl.h - $(CC) $(FLAGS) -o memory.o -c memory.c - -print.o: print.c ../rtl.h - $(CC) $(FLAGS) -o print.o -c print.c - -stdlib.o: stdlib.c ../rtl.h - $(CC) $(FLAGS) -o stdlib.o -c stdlib.c - -string.o: string.c ../rtl.h - $(CC) $(FLAGS) -o string.o -c string.c - -list.o: list.c ../rtl.h - $(CC) $(FLAGS) -o list.o -c list.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/freeldr/rules.mk b/freeldr/freeldr/rules.mk deleted file mode 100644 index 7c1f7f79caf..00000000000 --- a/freeldr/freeldr/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - - -CC = gcc -LD = ld -AR = ar -RM = cmd /C del -CP = cmd /C copy -MAKE = make -NASM_CMD = nasm -OBJCOPY = objcopy - -# For a release build uncomment this line -#FLAGS = -Wall -nostdlib -nostdinc -fno-builtin -I./ -I../ -I../../ -O3 - -# For a debug build uncomment this line -FLAGS = -Wall -nostdlib -nostdinc -fno-builtin -I./ -I../ -I../../ -DDEBUG -O3 diff --git a/freeldr/freeldr/ui/Makefile b/freeldr/freeldr/ui/Makefile deleted file mode 100644 index d7ba4317472..00000000000 --- a/freeldr/freeldr/ui/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# FreeLoader -# Copyright (C) 1998-2002 Brian Palmer -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -include ../rules.mk - -OBJS = tui.o menu.o - -.PHONY : clean - -all: ui.a - -ui.a: $(OBJS) - $(LD) -r -o ui.a $(OBJS) - -tui.o: tui.c ../ui.h - $(CC) $(FLAGS) -o tui.o -c tui.c - -menu.o: menu.c ../ui.h - $(CC) $(FLAGS) -o menu.o -c menu.c - -clean: - - $(RM) *.o - - $(RM) *.a diff --git a/freeldr/sed.exe b/freeldr/sed.exe new file mode 100644 index 00000000000..db6416fe9bf Binary files /dev/null and b/freeldr/sed.exe differ