-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (27 loc) · 913 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
SDKBASE=../gcc_emac/
#CROSS=$(SDKBASE)gcc-3.3.6-SIB/bin/
CROSS=$(SDKBASE)bin/i486-linux-
CC = $(CROSS)c++
CC2 = $(CROSS)gcc
DLIBS=-lpthread -lmodbus -lstdc++
OFLAGS = -Wall -O -Wno-deprecated -le12packet
CPLUSFLAGS = -Wall -O -Wno-deprecated
RCFLAGS = -Wall -O -Wno-deprecated -le12packet
CFLAGS = -Wall -O -le12packet
INCLUDES =$(SDKBASE)include
LIBRARIES =$(SDKBASE)lib
COPCODE = -I$(INCLUDES) -L$(LIBRARIES)
all: robotCommand
robotCommand: robotCommand.cpp Robot.o constants.o ioControl.o Coprocessor.o
$(CC) $(COPCODE) -o $@ $(RCFLAGS) $^
Robot.o: Robot.cpp
$(CC) $(COPCODE) -c -o $@ $(CPLUSFLAGS) $^
ioControl.o : ioControl.cpp
$(CC) $(COPCODE) -c -o $@ $(CPLUSFLAGS) $^
constants.o: constants.cpp
$(CC) $(COPCODE) -c -o $@ $(CPLUSFLAGS) $^
Coprocessor.o: Coprocessor.c
$(CC2) $(COPCODE) -c -o $@ $(CFLAGS) $^
clean:
$(RM) *.o robotCommand
$(RM) *~