--- /dev/null
+.PHONY: all clean
+
+all:
+ ./tools/build.sh
+
+clean:
+ rm -rf build/
\ No newline at end of file
#include <libnet.h>
#include <unistd.h>
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/wait.h>
void serve(int cfd, char** argv)
{
while (waitpid(-1, 0, WNOHANG) > 0);
}
perror("listen");
+ close(sfd);
return 0;
}
+++ /dev/null
-#!/bin/sh
-
-if [ "build.c" -nt "build.bin" ]; then
- cc -Wall -Wextra -Werror -o build.bin build.c
-fi
-./build.bin
\ No newline at end of file
#include <liba.h>
-#include <impl/dial.h>
+#include <libnet.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netdb.h>
struct in_addr netresolve(char *hostname)
{
+++ /dev/null
-#!/bin/sh
-
-. config.mk
-
-if [ -d "$2" ]; then
- echo "Binary $1"
-else
- if [ "$2" -nt "$1" ]; then
- echo "Binary $1"
- mkdir -p build/bin
- $CC $CPPPATH $CFLAGS -o "$@"
- fi
-fi
-
+++ /dev/null
-#!/bin/sh
-
-. config.mk
-
-srcdir="${1:?No library directory specified}"
-srcdir="${srcdir%/}"
-lib="${srcdir##*/}"
-mkdir -p "build/obj/$lib"
-parallel --halt now,fail=1 "Object build/obj/$lib/{/.}.o {}" ::: $srcdir/*.c
-mkdir -p "build/lib"
-
-echo Library "build/lib/$lib.a"
-ar rcs "build/lib/$lib.a" "build/obj/$lib"/*.o
\ No newline at end of file
+++ /dev/null
-#!/bin/sh
-
-. config.mk
-
-if [ "$2" -nt "$1" ]; then
- echo "Object $1"
- $CC $CPPPATH $CFLAGS -c -o "$@"
-fi
\ No newline at end of file
#include <dirent.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/wait.h>
enum { F_FILES, F_DIRS };
void (*build)(struct Target*);
} Target;
-int MaxJobs = 1;
+int MaxJobs = 12;
char* CCCMD[] = {
"cc",
"-Iinc/",
"-I/usr/X11/include/",
"-I/usr/X11/include/freetype2",
+ "-I/usr/include/freetype2/",
"-c", "-o",
/* output */
/* inputs */
--- /dev/null
+#!/bin/sh
+
+if [ "tools/build.c" -nt "tools/build.bin" ]; then
+ cc -Wall -Wextra -Werror -o tools/build.bin tools/build.c
+fi
+./tools/build.bin
\ No newline at end of file