Forked from
Michal Vlasák / ni-run-template
10 commits behind, 69 commits ahead of the upstream repository.
-
Michal Štěpánek authoredMichal Štěpánek authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile 969 B
CC=gcc
CFLAGS=-Wall -pedantic -Wextra -g #-fsanitize=address,undefined
LFLAGS=
OUTPUT=fml
SRC_DIR=./src
BUILD_DIR=./build
.PHONY: init fml
all: init fml
fml: $(BUILD_DIR)/arena.o $(BUILD_DIR)/parser.o $(BUILD_DIR)/ast_interpreter.o $(BUILD_DIR)/bc_interpreter.o $(BUILD_DIR)/bc_compiler.o $(SRC_DIR)/fml.c \
$(BUILD_DIR)/heap.o #$(BUILD_DIR)/%.o
$(CC) $(CFLAGS) $(LFLAGS) $? -o $(OUTPUT)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
# $(SRC_DIR)/parser.o $(BUILD_DIR)/heap.o
$(BUILD_DIR)/bc_interpreter.o: $(SRC_DIR)/bc_interpreter.c
$(CC) $(CFLAGS) -c $? -o $@
# $(SRC_DIR)/parser.o $(BUILD_DIR)/heap.o
$(BUILD_DIR)/ast_interpreter.o: $(SRC_DIR)/ast_interpreter.c
$(CC) $(CFLAGS) -c $? -o $@
$(BUILD_DIR)/parser.o: $(SRC_DIR)/parser.c
$(CC) $(CFLAGS) -c $< -o $@
$(BUILD_DIR)/arena.o: $(SRC_DIR)/arena.c
$(CC) $(CFLAGS) -c $< -o $@
$(BUILD_DIR)/heap.o: $(SRC_DIR)/heap.c
$(CC) $(CFLAGS) -c $< -o $@
init:
mkdir -p build