OSDN Git Service

first commit
[winexe-harib/winexe-harib.git] / haribote / Makefile
1 TOOLPATH = ../../z_tools/
2 INCPATH  = ../../z_tools/haribote/
3
4 MAKE     = make.exe -r
5 ASM     = nasm
6 GAS2NASK = $(TOOLPATH)gas2nask.exe -a
7 OBJ2BIM  = $(TOOLPATH)obj2bim.exe
8 MAKEFONT = $(TOOLPATH)makefont.exe
9 BIN2OBJ  = $(TOOLPATH)bin2obj.exe
10 BIM2HRB  = $(TOOLPATH)bim2hrb.exe
11 RULEFILE = ../haribote.rul
12 EDIMG    = $(TOOLPATH)edimg.exe
13 IMGTOL   = $(TOOLPATH)imgtol.com
14 GOLIB    = $(TOOLPATH)golib00.exe 
15 COPY     = cp
16 DEL      = rm
17 OBJCOPY  = objcopy
18 OBJS = filesystem.obj screen.obj timer.obj desctable.obj naskfunc.obj pic.obj startup.obj debug.obj MemMan.obj ProcessMan.obj ThreadMan.obj
19 CFILES = filesystem.cpp screen.cpp timer.cpp desctable.cpp naskfunc.cpp pic.cpp startup.cpp debug.cpp MemMan.cpp ProcessMan.cpp ThreadMan.cpp
20 LIBS = ./ata/ataio.lib ../golibc/golibc.lib
21 CC = g++
22 BOOTPACKTARGET = bootpack.exe
23 CFLAGS = -g -c -nostdinc -fno-rtti -fno-builtin-alloca -I../include -Ig:/lib/boost -DBOOST_NO_EXCEPTIONS -DBOOST_SP_DISABLE_THREADS -DBOOST_DISABLE_ASSERTS -DBOOST_NO_AUTO_PTR -DBOOST_NO_IOSTREAM -masm=intel -std=c++0x
24
25\83f\83t\83H\83\8b\83g\93®\8dì
26
27 default :
28         cd ata && $(MAKE)
29         $(MAKE) mbr.bin
30         $(MAKE) iplhd.bin
31         $(MAKE) haribote.sys
32
33
34\83t\83@\83C\83\8b\90\90¬\8bK\91¥
35
36 mbr.bin : mbr.asm Makefile
37         $(ASM) mbr.asm -o mbr.bin -l mbr.lst
38         perl mbr.pl >> mbr.bin
39
40 iplhd.bin : iplhd.asm Makefile
41         $(ASM) iplhd.asm -o iplhd.bin -l iplhd.lst
42
43 asmhead.bin : asmhead.asm Makefile
44         $(ASM) asmhead.asm -o asmhead.bin -l asmhead.lst
45
46 bootpack.obj : bootpack.cpp Makefile
47         $(CC) $(CFLAGS) bootpack.cpp -o bootpack.obj
48
49 $(BOOTPACKTARGET) : bootpack.obj $(OBJS) $(LIBS) Makefile
50         g++ -shared  -Wl,--image-base=0x00280000 -e _user_start -static -nostdlib -lgcc_s -lgcc bootpack.obj $(OBJS) $(LIBS) -o $(BOOTPACKTARGET)
51 #       objcopy -j .text -I pe-i386 -O binary bootpack.dll bootpack.sys
52
53
54 haribote.sys : asmhead.bin $(BOOTPACKTARGET) Makefile
55         cp asmhead.bin haribote.sys
56         cat $(BOOTPACKTARGET) >> haribote.sys
57
58 naskfunc.obj : naskfunc.asm Makefile
59         $(ASM) -f win32 naskfunc.asm -o naskfunc.obj -l naskfunc.lst
60
61
62\88ê\94Ê\8bK\91¥
63
64 %.asm : %.gas Makefile
65         $(GAS2NASK) $*.gas $*.asm
66
67 %.obj : %.cpp Makefile
68         $(CC) $(CFLAGS) $*.cpp -o $*.obj
69
70
71\83R\83}\83\93\83h
72
73 clean :
74         -$(DEL) mbr.bin
75         -$(DEL) iplhd.bin
76         -$(DEL) $(OBJS) bootpack.obj
77
78
79 src_only :
80         $(MAKE) clean
81         -$(DEL) haribote.sys
82
83 depend :
84         makedepend --  -- $(CFILES) bootpack.cpp
85         
86 # DO NOT DELETE
87
88 filesystem.obj: filesystem.h bootpack.h typedefs.h ata/ataio.h ata\dos.h
89 filesystem.obj: fat32.h screen.h debug.h
90 screen.obj: screen.h ata/ataio.h ata\dos.h bootpack.h typedefs.h hankaku.h
91 timer.obj: bootpack.h typedefs.h timer.h naskfunc.h pic.h
92 desctable.obj: bootpack.h typedefs.h desctable.h naskfunc.h screen.h
93 desctable.obj: ata/ataio.h ata\dos.h debug.h processman.h Vector.h MemMan.h
94 desctable.obj: FileSystem.h fat32.h ThreadMan.h
95 pic.obj: bootpack.h typedefs.h pic.h naskfunc.h
96 debug.obj: debug.h screen.h ata/ataio.h ata\dos.h bootpack.h typedefs.h
97 debug.obj: MemMan.h
98 MemMan.obj: MemMan.h typedefs.h naskfunc.h debug.h vector.h
99 ProcessMan.obj: ProcessMan.h typedefs.h Vector.h MemMan.h FileSystem.h
100 ProcessMan.obj: bootpack.h ata/ataio.h ata\dos.h fat32.h desctable.h
101 ProcessMan.obj: ThreadMan.h filesystem.h debug.h naskfunc.h
102 ThreadMan.obj: ThreadMan.h desctable.h typedefs.h MemMan.h Vector.h debug.h
103 ThreadMan.obj: ProcessMan.h FileSystem.h bootpack.h ata/ataio.h ata\dos.h
104 ThreadMan.obj: fat32.h
105 bootpack.obj: bootpack.h typedefs.h filesystem.h ata/ataio.h ata\dos.h
106 bootpack.obj: fat32.h screen.h timer.h desctable.h pic.h naskfunc.h MemMan.h
107 bootpack.obj: debug.h ProcessMan.h Vector.h FileSystem.h ThreadMan.h