3 # Copyright (C) 1999, 2000, 2001 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.
24 export RM
= cmd
/C del
25 export CP
= cmd
/C copy
28 #FLAGS = -Wall -nostdlib -nostdinc -fno-builtin -I./ -DDEBUG -O3
29 FLAGS
= -Wall
-nostdlib
-nostdinc
-fno-builtin
-I.
/ -DDEBUG
-O3
31 # asmcode.o has to be first in the link line because it contains the startup code
32 #OBJS = asmcode.a asmcode.o mb.o boot.o freeldr.o rtl.o fs.a fs.o fat.o \
33 # reactos.o tui.o menu.o miscboot.o options.o linux.o multiboot.o arcname.o \
34 # mem.o memory.o debug.o parseini.o registry.o import.o
35 ASM_OBJS
= asmcode.o mb.o boot.o mem.o
36 OBJS
= freeldr.o miscboot.o options.o linux.o multiboot.o debug.o parseini.o oslist.o
37 LIBS
= rtl fs ui reactos comm disk mm
38 LIB_FILES
= rtl
/rtl.a fs
/fs.a ui
/ui.a reactos
/reactos.a comm
/comm.a disk
/disk.a mm
/mm.a
44 freeldr.sys
: asmcode.a c_code.a
45 $(LD
) -N
-Ttext
=0x8000 --oformat
=binary
-s
-o f.sys asmcode.a c_code.a
46 ..
/bootsect
/stubit ..
/bootsect
/fatstub.bin f.sys freeldr.sys
48 freeldr.exe
: asmcode.a c_code.a
49 $(LD
) -o freeldr.exe asmcode.a c_code.a
51 asmcode.a
: $(ASM_OBJS
)
52 $(LD
) -r
-o asmcode.a
$(ASM_OBJS
)
54 c_code.a
: c_code1.a
$(LIBS
)
55 $(LD
) -r
-o c_code.a c_code1.a
$(LIB_FILES
)
58 $(LD
) -r
-o c_code1.a
$(OBJS
)
60 asmcode.o
: asmcode.S asmcode.h
61 $(CC
) $(FLAGS
) -o asmcode.o
-c asmcode.S
63 mb.o
: mb.S asmcode.h multiboot.h
64 $(CC
) $(FLAGS
) -o mb.o
-c mb.S
66 boot.o
: boot.S asmcode.h
67 $(CC
) $(FLAGS
) -o boot.o
-c boot.S
69 mem.o
: mem.S asmcode.h
70 $(CC
) $(FLAGS
) -o mem.o
-c mem.S
72 freeldr.o
: freeldr.c freeldr.h rtl.h fs.h reactos.h ui.h asmcode.h miscboot.h
73 $(CC
) $(FLAGS
) -o freeldr.o
-c freeldr.c
75 miscboot.o
: miscboot.c freeldr.h asmcode.h rtl.h fs.h ui.h miscboot.h
76 $(CC
) $(FLAGS
) -o miscboot.o
-c miscboot.c
78 options.o
: options.c freeldr.h rtl.h ui.h options.h
79 $(CC
) $(FLAGS
) -o options.o
-c options.c
81 linux.o
: linux.c freeldr.h rtl.h ui.h linux.h
82 $(CC
) $(FLAGS
) -o linux.o
-c linux.c
84 multiboot.o
: multiboot.c freeldr.h rtl.h fs.h multiboot.h ui.h
85 $(CC
) $(FLAGS
) -o multiboot.o
-c multiboot.c
87 debug.o
: debug.c debug.h Makefile
88 $(CC
) $(FLAGS
) -o debug.o
-c debug.c
90 parseini.o
: parseini.c parseini.h Makefile
91 $(CC
) $(FLAGS
) -o parseini.o
-c parseini.c
93 oslist.o
: oslist.c oslist.h Makefile
94 $(CC
) $(FLAGS
) -o oslist.o
-c oslist.c
123 $(MAKE
) -C reactos
clean
124 $(MAKE
) -C comm
clean
125 $(MAKE
) -C disk
clean