txlyre 2 years ago
parent
commit
8fa8b2475d
2 changed files with 25 additions and 0 deletions
  1. 5 0
      makeshot/Config
  2. 20 0
      makeshot/Recipe

+ 5 - 0
makeshot/Config

@@ -0,0 +1,5 @@
+$CC = "clang";
+$CFLAGS = "-w -c -Os " . rtrim(`pkg-config --cflags pango`);
+$LDFLAGS = "-lcairo -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0";
+$SOURCES = glob("*.c");
+$OUT = "makeshot";

+ 20 - 0
makeshot/Recipe

@@ -0,0 +1,20 @@
+<recipe>
+  <script src="Config"></script>
+
+  <rule>
+    $objects = array();
+    foreach ($SOURCES, $k: $source) {
+      `$CC $CFLAGS $source`;
+
+      push($objects, replace($source, ".c", ".o"));
+    }
+
+    $objects = unwords($objects);
+
+    `$CC $LDFLAGS $objects -o $OUT`;
+  </rule>
+
+  <rule name="clear">
+    `rm -rf *.o makeshot`;
+  </rule>
+</recipe>