Created
February 16, 2013 19:34
-
-
Save trainman419/4968375 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS=-mmcu=$(DEVICE) -Wall -Werror -Iros_lib -O -DF_CPU=16000000UL -Idagny_protocol | |
LDFLAGS=-mmcu=$(DEVICE) | |
ASFLAGS=-mmcu=$(DEVICE) | |
CXXFLAGS=$(CFLAGS) | |
LDLIBS=-lm | |
CSRC=motor.c i2c.c estop.c | |
CXXSRC=gps.cpp interrupt.cpp main.cpp steer.cpp TinyGPS.cpp sonar.cpp imu.cpp protocol.cpp | |
DRIVERS=adc.o bump.o power.o pwm.o serial.o serial-interrupt.o servo.o | |
OBJS=$(CSRC:.c=.o) $(CXXSRC:.cpp=.o) | |
# implicit header dependency rules | |
.%.mk: %.c | |
$(CC) -MM $^ -MF $@ | |
.%.mk: %.cpp | |
$(CXX) -MM $^ -MF $@ | |
.PHONY: all | |
all: main | |
main: $(OBJS) $(DRIVERS) | |
.PHONY: clean | |
clean: | |
rm *.o *.i *.ii *.s *.hex || true | |
#include dependency rules | |
include $(CSRC:%.c=.%.mk) | |
include $(CXXSRC:%.cpp=.%.mk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment