aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 952595e866c487244bb9ab4b79f098cd2731bd52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Compiler, Linker, and Assembler
CC := clang
AR := ar
AS := nasm

# All needed build directories
INC_DIR := include
SRC_DIR := sys
BIN_DIR := bin
LIB_DIR := lib
OBJ_DIR := build

# Flags, Libraries and Includes
CFLAGS := -g -O1 -march=native -ffast-math -fno-strict-aliasing -fwrapv -fms-extensions -Wno-microsoft-anon-tag -Wno-incompatible-function-pointer-types
AFLAGS := -f elf64 
INCS   := -I$(INC_DIR)
ELIBS  := 

# Named generic rules (must be evaluated lazily)
COMPILE  = $(CC) -MMD $(CFLAGS) $(TCFLAGS) $(INCS) $(TCINCS) -o $@ -c $< 
LINK 	 = $(CC) -MMD $(CFLAGS) $(TCFLAGS) -o $@ $^ $(ELIBS) $(TCLIBS)
COMPLINK = $(CC) -MMD $(CFLAGS) $(TCFLAGS) $(INCS) $(TCINCS) -o $@ $^ $(ELIBS) $(TCLIBS)
ASSEMBLE = $(AS) $(AFLAGS) $(TCFLAGS) -o $@ $< 
ARCHIVE  = $(AR) crs $@ $^

include rules.mk