3 # Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 # asmcode.o has to be first in the link line because it contains the startup code
23 #OBJS = asmcode.a asmcode.o mb.o boot.o freeldr.o rtl.o fs.a fs.o fat.o \
24 # reactos.o tui.o menu.o miscboot.o options.o linux.o multiboot.o arcname.o \
25 # mem.o memory.o debug.o parseini.o registry.o import.o
26 #ASM_OBJS = asmcode.o mb.o boot.o mem.o
27 OBJS
= freeldr.o miscboot.o options.o linux.o multiboot.o debug.o parseini.o oslist.o
28 LIBS
= arch rtl fs ui reactos comm disk mm cache
29 LIB_FILES
= arch
/arch.a rtl
/rtl.a fs
/fs.a ui
/ui.a reactos
/reactos.a
30 LIB_FILES2
= comm
/comm.a disk
/disk.a mm
/mm.a cache
/cache.a
37 $(LD
) -N
-Ttext
=0x8000 --oformat
=binary
-s
-o f.sys c_code.a
38 ..
/bootsect
/stubit ..
/bootsect
/fatstub.bin f.sys freeldr.sys
40 freeldr.exe
: asmcode.a c_code.a
41 $(LD
) -o freeldr.exe asmcode.a c_code.a
43 c_code.a
: $(LIBS
) c_code1.a c_code2.a
44 $(LD
) -r
-o c_code.a
$(LIB_FILES
) c_code1.a c_code2.a
47 $(LD
) -r
-o c_code1.a
$(LIB_FILES2
)
50 $(LD
) -r
-o c_code2.a
$(OBJS
)
52 freeldr.o
: freeldr.c freeldr.h rtl.h fs.h reactos.h ui.h arch.h miscboot.h
53 $(CC
) $(FLAGS
) -o freeldr.o
-c freeldr.c
55 miscboot.o
: miscboot.c freeldr.h arch.h rtl.h fs.h ui.h miscboot.h
56 $(CC
) $(FLAGS
) -o miscboot.o
-c miscboot.c
58 options.o
: options.c freeldr.h rtl.h ui.h options.h
59 $(CC
) $(FLAGS
) -o options.o
-c options.c
61 linux.o
: linux.c freeldr.h rtl.h ui.h linux.h
62 $(CC
) $(FLAGS
) -o linux.o
-c linux.c
64 multiboot.o
: multiboot.c freeldr.h rtl.h fs.h multiboot.h ui.h
65 $(CC
) $(FLAGS
) -o multiboot.o
-c multiboot.c
67 debug.o
: debug.c debug.h
68 $(CC
) $(FLAGS
) -o debug.o
-c debug.c
70 parseini.o
: parseini.c parseini.h
71 $(CC
) $(FLAGS
) -o parseini.o
-c parseini.c
73 oslist.o
: oslist.c oslist.h
74 $(CC
) $(FLAGS
) -o oslist.o
-c oslist.c
109 $(MAKE
) -C arch
clean
110 $(MAKE
) -C reactos
clean
111 $(MAKE
) -C comm
clean
112 $(MAKE
) -C disk
clean
117 $(MAKE
) -C cache
clean