Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2105 - 1
OBJ = main.o calibration.o file.o frame.o gamepad.o gpio.o uart.o
2
DEPS = main.h calibration.h file.h frame.h gamepad.h gpio.h uart.h types.h
3
LIBS = -lncurses
4
CFLAGS = -std=c99 -Wall
5
CC = gcc
6
EXTENSION = .c
7
 
8
#define a rule that applies to all files ending in the .o suffix, which says that the .o file depends upon the .c version of the file and all the .h files included in the DEPS macro.  Compile each object file
9
%.o: %$(EXTENSION) $(DEPS)
10
	$(CC) -c -o $@ $< $(CFLAGS)
11
 
12
#Combine them into the output file
13
#Set your desired exe output file name here
14
all: PiMote clean
15
 
16
PiMote: $(OBJ)
17
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
18
 
19
#Cleanup
20
.PHONY: clean
21
 
22
clean:
23
	rm -f *.o *~ core *~