Default options in config.mk, test targets
This commit is contained in:
parent
9f92308131
commit
e13dce000a
1 changed files with 11 additions and 1 deletions
12
config.mk
12
config.mk
|
@ -4,12 +4,22 @@ MAKEFLAGS += --no-print-directory
|
|||
.PRECIOUS: %.o
|
||||
.PRECIOUS: %.asm
|
||||
|
||||
TARGET ?= main.elf
|
||||
SRCS ?= $(wildcard *.cc)
|
||||
HDRS ?= $(wildcard *.h)
|
||||
|
||||
OBJS = $(SRCS:.cc=.o)
|
||||
ASMS = $(SRCS:.cc=.asm)
|
||||
|
||||
all: $(TARGET) $(ASMS)
|
||||
$(TARGET): $(OBJS)
|
||||
|
||||
test: $(TARGET)
|
||||
./$(TARGET)
|
||||
|
||||
check: $(SRCS) $(HDRS)
|
||||
cppcheck --language=c++ $^
|
||||
|
||||
asm: $(ASMS)
|
||||
|
||||
%.o: %.cc
|
||||
|
@ -27,4 +37,4 @@ asm: $(ASMS)
|
|||
clean:
|
||||
rm -f *.elf *.asm *.o
|
||||
|
||||
.PHONY: clean all asm
|
||||
.PHONY: clean all asm check test
|
||||
|
|
Loading…
Reference in a new issue