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

svn path=/trunk/; revision=2904
This commit is contained in:
Brian Palmer 2002-05-03 23:56:18 +00:00
parent 42bf54f96d
commit ab6d9f2a6b
37 changed files with 251 additions and 608 deletions

View file

@ -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)

View file

@ -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

View file

@ -1,35 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,56 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,39 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,39 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,42 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,42 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -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 <brianp@sginet.com>"
// 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);

View file

@ -1,42 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,39 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,48 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,48 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,34 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

View file

@ -1,39 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# 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

BIN
freeldr/sed.exe Normal file

Binary file not shown.