-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
32 lines (24 loc) · 853 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
INCLUDE += -I /home/ssk/ethercat/_install/include
INCLUDE += -I ./ethercat
INCLUDE += -I ./term
INCLUDE += -I ./dcsync
CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE)
LIBS += -lethercat
LIBS += -lpthread
LDFLAGS := -L /home/ssk/ethercat/_install/lib
CXXFLAGS:= $(CFLAGS)
SOURCE := $(wildcard *.c) $(wildcard term/*.c) $(wildcard ethercat/*.c) $(wildcard dcsync/*.c)
OBJS := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))
TARGET := igh_ethercat_dc_motor
CC=/home/ssk/t507-env/LinuxSDK/out/t507/tlt507-evm/longan/buildroot/host/usr/bin/aarch64-linux-gnu-gcc
.PHONY : everything objs clean distclean rebuild
all : $(TARGET)
objs : $(OBJS)
rebuild: distclean all
clean :
rm -rf *~
rm -rf *.o ethercat/*.o term/*.o
distclean : clean
rm -rf $(TARGET)
$(TARGET) : $(OBJS)
$(CC) $(CXXFLAGS) -g -o $@ $(OBJS) $(LDFLAGS) $(LIBS)