# requires the pca9685_pwm library to be installed first # The compiler to use CC=g++ # Options flags to pass to the compiler CFLAGS=-c -Wall # Search for src file in the 'src' directory VPATH=src # Object file directory for builds BUILDDIR=obj $(BUILDDIR)/%.o: %.cc $(CC) $(CFLAGS) $< -o $@ OBJS = $(BUILDDIR)/main.o $(BUILDDIR)/servo.o $(BUILDDIR)/servo_test: $(OBJS) $(CC) $(OBJS) -o $(BUILDDIR)/servo_test -lpca9685_pwm clean: rm -f $(OBJS) $(BUILDDIR)/servo_test