-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
26 lines (16 loc) · 782 Bytes
/
makefile
File metadata and controls
26 lines (16 loc) · 782 Bytes
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
DEBUG_FLAGS := -g
ARCHIVE_DIR := build/llvl_var.a
GEN_FLAGS := -O0 -std=c99 -Werror=int-conversion -Werror=pointer-arith -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=return-type
BUILD_DIR := ./build
LLVL_BIN := $(BUILD_DIR)/llvl_var.o
ASM_BIN := $(BUILD_DIR)/llvl_var.asm.o
LLVL_DIR := llvl_var
$(ASM_BIN): $(LLVL_DIR)/src/llvl_var.n.asm
nasm $(DEBUG_FLAGS) -F dwarf -f elf64 $(LLVL_DIR)/src/llvl_var.n.asm -o $(ASM_BIN)
$(LLVL_BIN): $(LLVL_DIR)/llvl_var.89.h $(LLVL_DIR)/pow_lookup.89.h $(LLVL_DIR)/src/llvl_var.89.c
gcc -c $(DEBUG_FLAGS) $(GEN_FLAGS) $(LLVL_DIR)/src/llvl_var.89.c -o $(LLVL_BIN)
build: $(LLVL_BIN) $(ASM_BIN)
build_as_ar: $(LLVL_BIN) $(ASM_BIN)
ar rcs $(ARCHIVE_DIR) $(LLVL_BIN) $(ASM_BIN)
clean:
rm ./build/*.o