Rev 9503 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9503 | Rev 9797 | ||
---|---|---|---|
1 | if tup.getconfig("NO_FASM") ~= "" then return end |
1 | if tup.getconfig("NO_FASM") ~= "" then return end |
2 | if tup.getconfig("NO_GCC") ~= "" then return end |
2 | if tup.getconfig("NO_GCC") ~= "" then return end |
3 | tup.include("../../../programs/use_gcc.lua") |
3 | tup.include("../../../programs/use_gcc.lua") |
4 | 4 | ||
5 | DRV_DIR = "../.." |
5 | DRV_DIR = "../.." |
6 | INCLUDES = string.format(" -I. -I. -I%s/include -I%s/include/linux -I%s/include/uapi ", DRV_DIR, DRV_DIR, DRV_DIR) |
6 | INCLUDES = string.format(" -I. -I. -I%s/include -I%s/include/linux -I%s/include/uapi ", DRV_DIR, DRV_DIR, DRV_DIR) |
7 | 7 | ||
8 | DEFINES = [[ -D__KERNEL__ -DGEODE_LOG="\"/tmp0/1/geode.log"\" -DCONFIG_X86_32 -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE -DCONFIG_PRINTK -DCONFIG_PCI ]] |
8 | DEFINES = [[ -D__KERNEL__ -DGEODE_LOG="\"/tmp0/1/geode.log"\" -DCONFIG_X86_32 -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE -DCONFIG_PRINTK -DCONFIG_PCI ]] |
9 | CFLAGS = " -Os -fomit-frame-pointer -fno-builtin-printf " .. DEFINES |
9 | CFLAGS = " -Os -fomit-frame-pointer -fno-builtin-printf " .. DEFINES |
10 | LDFLAGS = " -nostdlib -shared -s --image-base 0 --file-alignment 512 --section-alignment 4096 -L../../ddk " |
10 | LDFLAGS = " -nostdlib -shared -s --image-base 0 --file-alignment 512 --section-alignment 4096 -L../../ddk " |
11 | 11 | ||
12 | NAME = "geode.sys" |
12 | NAME = "geode.sys" |
13 | 13 | ||
14 | compile_gcc{ "geode.c" } |
14 | compile_gcc{ "geode.c" } |
15 | OBJS.extra_inputs = {"../../ddk/libcore.a", "../../ddk/libddk.a"} |
15 | OBJS.extra_inputs = {"../../ddk/ |
16 | 16 | ||
17 | LIBS = " -lddk -lcore " |
17 | LIBS = " -lddk -lcore " |
18 | tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), NAME); |
18 | tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), NAME); |
19 | tup.rule("geode.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "geode") |
19 | tup.rule("geode.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "geode") |