aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: c7a94e1e41adefb5b6944c8f626eb4da1d384873 (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 -O2 -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