Adding usermode tree
[tpg/acess2.git] / Usermode / Applications / init_src / Makefile
diff --git a/Usermode/Applications/init_src/Makefile b/Usermode/Applications/init_src/Makefile
new file mode 100644 (file)
index 0000000..a51f61b
--- /dev/null
@@ -0,0 +1,27 @@
+#
+#
+#
+
+CC = gcc
+AS = nasm
+LD = ld
+RM = rm -f
+
+ASFLAGS = -felf
+CPPFLAGS = -nostdinc -I../../include
+CFLAGS = -Wall -Werror -O3 $(CPPFLAGS)
+LDFLAGS = -I/Acess/Libs/ld-acess.so -L../../Libraries ../../Libraries/crt0.o -lacess
+
+OBJ = main.o
+BIN = ../init
+
+.PHONY: all clean
+
+all: $(BIN)
+
+$(BIN): $(OBJ) Makefile
+       $(LD) $(LDFLAGS) $(OBJ) -o $(BIN)
+       cp $(BIN) /mnt/AcessHDD/Acess2/
+
+%.o: %.c
+       $(CC) $(CFLAGS) -c $< -o $@

UCC git Repository :: git.ucc.asn.au