From 65264ba6d1f7e7402009f33b60e3263bf1f02498 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 17 Apr 2020 18:04:04 -0700 Subject: init: prototype of code skeleton --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.1