clean up makefile

This commit is contained in:
matt 2020-04-28 13:32:47 -07:00
parent cbeced8550
commit 2fc8b382ef

View File

@ -93,7 +93,7 @@ OBJDIRS := $(SRC_FILES:%=./bin/%)
build: $(OUT)$(NAME) build: $(OUT)$(NAME)
$(OBJDIRS): $(OBJDIRS):
mkdir -p $(shell dirname $@) @mkdir -p $(shell dirname $@)
$(OUT)%.cpp.o: %.cpp $(OUT)%.cpp.o: %.cpp
$(CXX) $(CXXFLAGS) -c $(INC_DIRS) -o $@ $< $(CXX) $(CXXFLAGS) -c $(INC_DIRS) -o $@ $<
$(OUT)%.c.o: %.c $(OUT)%.c.o: %.c
@ -111,11 +111,11 @@ test:
$(OUT)test $(OUT)test
protobufg: protobufg:
mkdir -p protobuf/gateway @mkdir -p protobuf/gateway
python3 external/nanopb/generator/nanopb_generator.py gateway/message.proto -D protobuf python3 external/nanopb/generator/nanopb_generator.py gateway/message.proto -D protobuf
bin: bin:
mkdir bin @mkdir bin
flash: $(OUT)$(NAME) flash: $(OUT)$(NAME)
avrdude -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:$(OUT)$(NAME).hex:i avrdude -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:$(OUT)$(NAME).hex:i