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
= rtl fs ui reactos comm disk mm cache
29 LIB_FILES
= rtl
/rtl.a fs
/fs.a ui
/ui.a reactos
/reactos.a comm
/comm.a disk
/disk.a mm
/mm.a cache
/cache.a
35 freeldr.sys
: asmcode.a c_code.a
36 $(LD
) -N
-Ttext
=0x8000 --oformat
=binary
-s
-o f.sys asmcode.a c_code.a
37 ..
/bootsect
/stubit ..
/bootsect
/fatstub.bin f.sys freeldr.sys
39 freeldr.exe
: asmcode.a c_code.a
40 $(LD
) -o freeldr.exe asmcode.a c_code.a
42 asmcode.a
: $(ASM_OBJS
)
43 $(LD
) -r
-o asmcode.a
$(ASM_OBJS
)
45 c_code.a
: c_code1.a
$(LIBS
)
46 $(LD
) -r
-o c_code.a c_code1.a
$(LIB_FILES
)
49 $(LD
) -r
-o c_code1.a
$(OBJS
)
51 asmcode.o
: asmcode.S asmcode.h
52 $(CC
) $(FLAGS
) -o asmcode.o
-c asmcode.S
54 mb.o
: mb.S asmcode.h multiboot.h
55 $(CC
) $(FLAGS
) -o mb.o
-c mb.S
57 boot.o
: boot.S asmcode.h
58 $(CC
) $(FLAGS
) -o boot.o
-c boot.S
60 mem.o
: mem.S asmcode.h
61 $(CC
) $(FLAGS
) -o mem.o
-c mem.S
63 freeldr.o
: freeldr.c freeldr.h rtl.h fs.h reactos.h ui.h asmcode.h miscboot.h
64 $(CC
) $(FLAGS
) -o freeldr.o
-c freeldr.c
66 miscboot.o
: miscboot.c freeldr.h asmcode.h rtl.h fs.h ui.h miscboot.h
67 $(CC
) $(FLAGS
) -o miscboot.o
-c miscboot.c
69 options.o
: options.c freeldr.h rtl.h ui.h options.h
70 $(CC
) $(FLAGS
) -o options.o
-c options.c
72 linux.o
: linux.c freeldr.h rtl.h ui.h linux.h
73 $(CC
) $(FLAGS
) -o linux.o
-c linux.c
75 multiboot.o
: multiboot.c freeldr.h rtl.h fs.h multiboot.h ui.h
76 $(CC
) $(FLAGS
) -o multiboot.o
-c multiboot.c
78 debug.o
: debug.c debug.h Makefile
79 $(CC
) $(FLAGS
) -o debug.o
-c debug.c
81 parseini.o
: parseini.c parseini.h Makefile
82 $(CC
) $(FLAGS
) -o parseini.o
-c parseini.c
84 oslist.o
: oslist.c oslist.h Makefile
85 $(CC
) $(FLAGS
) -o oslist.o
-c oslist.c
117 $(MAKE
) -C reactos
clean
118 $(MAKE
) -C comm
clean
119 $(MAKE
) -C disk
clean
124 $(MAKE
) -C cache
clean