aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..65eb8b5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+# Compiler, Linker, and Assembler
+CC := clang
+AR := ar
+ASMR := nasm
+
+# All needed build directories
+INC_DIR := include
+SRC_DIR := src
+BIN_DIR := bin
+LIB_DIR := lib
+OBJ_DIR := build
+
+# Flags, Libraries and Includes
+INCS := -I$(INC_DIR)
+CFLAGS := -g -fno-strict-aliasing -fwrapv -fms-extensions
+AFLAGS := -f elf64
+
+TGTFLAG :=
+TGTINCS :=
+TGTLIBS :=
+
+# Named generic rules (must be evaluated lazily)
+COMPILE = $(CC) -MMD $(CFLAGS) $(TGTFLAGS) $(INCS) $(TGTINCS) -o $@ -c $<
+LINK = $(CC) -MMD $(CFLAGS) $(TGTFLAGS) -o $@ $^ $(LIBS) $(TGTLIBS)
+COMPLINK = $(CC) -MMD $(CFLAGS) $(TGTFLAGS) $(INCS) $(TGTINCS) -o $@ $< $(LIBS)
+ARCHIVE = $(AR) -crs $@ $^
+
+include rules.mk