-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
44 lines (29 loc) · 684 Bytes
/
GNUmakefile
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
########################################
# Find which compilers are installed.
#
VOLT ?= $(shell which volt)
########################################
# Basic settings.
#
VFLAGS ?= --internal-perf
LDFLAGS ?=
TARGET ?= battery
########################################
# Setting up the source.
#
include sources.mk
OBJ = $(patsubst src/%.volt, $(OBJ_DIR)/%.bc, $(SRC))
########################################
# Targets.
#
all: $(TARGET)
$(TARGET): $(SRC) GNUmakefile
@echo " VOLT $(TARGET)"
@$(VOLT) -I src $(VFLAGS) $(LDFLAGS) -o $(TARGET) $(SRC)
run: all
@./$(TARGET)
debug: all
@gdb --args ./$(TARGET)
clean:
@rm -rf $(TARGET) .obj
.PHONY: all run debug clean