Makefile
上传用户:qddsws
上传日期:2022-06-22
资源大小:723k
文件大小:1k
- #KERNEL MAKEFILE
- export C_INCLUDE_PATH=../include/
- DIRS = i386 lib drivers buses
- CC=i686-pc-linux-gnu-gcc
- LD=i686-pc-linux-gnu-ld
- TARGET = kernel.bin
- I386_OBJ = i386/exception.o i386/extern.o i386/idt.o i386/io_low_HLL.o i386/paging.o
- i386/panic.o i386/pcibios.o i386/pic.o i386/pmemmanager.o i386/memory_account.o
-
- LIB_OBJ = lib/string.o
- DRIVERS = drivers/net/pcnet32.o drivers/isa_devs/pit.o drivers/isa_devs/vbe21.o
- drivers/system_devs/sys_console.o drivers/system_devs/sys_layout.o
- drivers/isa_devs/psmouse.o drivers/isa_devs/rsi.o
- BUSES = buses/pci/pci.o buses/isa/isa.o buses/initbuses.o buses/system/system_bus.o
- all: main.o
- for dir in $(DIRS); do make -C $$dir; done
- #${LD} -o $(TARGET) --oformat binary -Ttext 0xc0000000 main.o $(I386_OBJ) $(LIB_OBJ) $(DRIVERS) $(BUSES)
- #${LD} -o $(TARGET) main.o $(I386_OBJ) $(LIB_OBJ) $(DRIVERS) $(BUSES)
- #move objects to build directory
- for i in `find . -iname "*.o"` ; do cp $$i ../build/ ; done
- clean:
- for dir in $(DIRS); do make -C $$dir clean; done
- -rm *.o
- -rm $(TARGET)