Browse Source

cflags and .build

Sevki Hasirci 3 years ago
parent
commit
1915d4a7fd
2 changed files with 82 additions and 0 deletions
  1. 5 0
      .build
  2. 77 0
      sys/src/FLAGS

+ 5 - 0
.build

@@ -0,0 +1,5 @@
+CC = gcc
+[darwin]
+TOOLPREFIX = x86_64-elf-
+[harvey]
+TOOLPREFIX = x86_64-harvey-elf-

+ 77 - 0
sys/src/FLAGS

@@ -0,0 +1,77 @@
+CMD_DEPS = [
+    "//sys/src/libavl:libavl",
+    "//sys/src/libcomplete:libcomplete",
+    "//sys/src/libcontrol:libcontrol",
+    "//sys/src/libdisk:libdisk",
+    "//sys/src/libflate:libflate",
+    "//sys/src/libframe:libframe",
+    "//sys/src/libgeometry:libgeometry",
+    "//sys/src/libhttpd:libhttpd",
+    "//sys/src/libbin:libbin",
+    "//sys/src/liblex:liblex",
+    "//sys/src/libmemdraw:libmemdrawiprint",
+    "//sys/src/libmemlayer:libmemlayer",
+    "//sys/src/libmemdraw:libmemdraw",
+    "//sys/src/libdraw:libdraw",
+    "//sys/src/libplumb:libplumb",
+    "//sys/src/libregexp:libregexp",
+    "//sys/src/libstdio:libstdio",
+    "//sys/src/libString:libString",
+    "//sys/src/libsunrpc:libsunrpc",
+    "//sys/src/liboventi:liboventi",
+    "//sys/src/lib9p:lib9p",
+    "//sys/src/libauth:libauth",
+    "//sys/src/libauthsrv:libauthsrv",
+    "//sys/src/libndb:libndb",
+    "//sys/src/libip:libip",
+    "//sys/src/libventi:libventi",
+    "//sys/src/libsec:libsec",
+    "//sys/src/libmp:libmp",
+    "//sys/src/libthread:libthread",
+    "//sys/src/libmach:libmach",
+    "//sys/src/libbio:libbio",
+    "//sys/src/libc:libc",
+]
+
+CMD_LINK_OPTS = [
+    "-static",
+    "-e_main",
+]
+
+KLIB_COMPILER_FLAGS = [
+	"-mcmodel=kernel",
+	"-O0",
+	"-fplan9-extensions",
+	"-mno-red-zone",
+	"-ffreestanding",
+	"-fno-builtin",
+	"-Wall",
+	"-Wno-missing-braces",
+	"-Wno-parentheses",
+	"-Wno-unknown-pragmas",
+	"-Wuninitialized",
+	"-g",
+]
+
+LIB_COMPILER_FLAGS = [
+    "-std=c11",
+    "-fasm",
+    "-c",
+    "-ffreestanding",
+    "-fno-builtin",
+    "-fno-omit-frame-pointer",
+    "-fplan9-extensions",
+    "-fvar-tracking",
+    "-fvar-tracking-assignments",
+    "-g",
+    "-gdwarf-2",
+    "-ggdb",
+    "-mcmodel=small",
+    "-mno-red-zone",
+    "-O0",
+    "-static",
+    "-Wall",
+    "-Wno-missing-braces",
+    "-Wno-parentheses",
+    "-Wno-unknown-pragmas"
+]