-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8670500
commit 67ae25e
Showing
58 changed files
with
10,946 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
============================================== | ||
Dynamixel SDK v3.0 (Protocol 1.0/2.0) | ||
============================================== | ||
|
||
- First released |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
################################################## | ||
# PROJECT: DynamixelSDK - ROBOTIS Ltd. | ||
################################################## | ||
|
||
#--------------------------------------------------------------------- | ||
# C++ COMPILER, COMPILER FLAGS, AND TARGET PROGRAM NAME | ||
#--------------------------------------------------------------------- | ||
DIR_DXL = ../.. | ||
DIR_OBJS = ./.objects | ||
|
||
INSTALL_ROOT = /usr/local | ||
|
||
MAJ_VERSION = 2 | ||
MIN_VERSION = 0 | ||
REV_VERSION = 0 | ||
|
||
TARGET = libdxl.so | ||
TARGET1 = $(TARGET).$(MAJ_VERSION) | ||
TARGET2 = $(TARGET).$(MAJ_VERSION).$(MIN_VERSION) | ||
TARGET3 = $(TARGET).$(MAJ_VERSION).$(MIN_VERSION).$(REV_VERSION) | ||
|
||
CHK_DIR_EXISTS = test -d | ||
PRINT = echo | ||
STRIP = strip | ||
AR = ar | ||
ARFLAGS = cr | ||
LD = g++ | ||
LDFLAGS = -shared -fPIC #-Wl,-soname,dxl | ||
LD_CONFIG = ldconfig | ||
CP = cp | ||
CP_ALL = cp -r | ||
RM = rm | ||
RM_ALL = rm -rf | ||
SYMLINK = ln -s | ||
MKDIR = mkdir | ||
CC = gcc | ||
CX = g++ | ||
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g | ||
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g | ||
# CXFLAGS += -DDEBUG | ||
INCLUDES += -I$(DIR_DXL)/include | ||
|
||
#--------------------------------------------------------------------- | ||
# Required external libraries | ||
#--------------------------------------------------------------------- | ||
#LIBRARIES += -lrt | ||
|
||
#--------------------------------------------------------------------- | ||
# SDK Files | ||
#--------------------------------------------------------------------- | ||
SOURCES = src/dynamixel_sdk/GroupBulkRead.cpp \ | ||
src/dynamixel_sdk/GroupBulkWrite.cpp \ | ||
src/dynamixel_sdk/GroupSyncRead.cpp \ | ||
src/dynamixel_sdk/GroupSyncWrite.cpp \ | ||
src/dynamixel_sdk/PacketHandler.cpp \ | ||
src/dynamixel_sdk/PortHandler.cpp \ | ||
src/dynamixel_sdk/Protocol1PacketHandler.cpp \ | ||
src/dynamixel_sdk/Protocol2PacketHandler.cpp \ | ||
src/dynamixel_sdk_linux/PortHandlerLinux.cpp \ | ||
|
||
|
||
OBJECTS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(basename $(notdir $(SOURCES))))) | ||
|
||
|
||
#--------------------------------------------------------------------- | ||
# COMPILING RULES | ||
#--------------------------------------------------------------------- | ||
$(TARGET): makedirs $(OBJECTS) | ||
$(LD) $(LDFLAGS) -o ./$(TARGET) $(OBJECTS) $(LIBS) | ||
|
||
makedirs: | ||
mkdir -p $(DIR_OBJS)/ | ||
|
||
clean: | ||
rm -f $(OBJECTS) ./$(TARGET) | ||
|
||
install: $(TARGET) | ||
# copy the binaries into the lib directory | ||
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/lib || $(MKDIR) $(INSTALL_ROOT)/lib | ||
-$(CP) "./$(TARGET)" "$(INSTALL_ROOT)/lib/$(TARGET)" | ||
-$(SYMLINK) "$(INSTALL_ROOT)/lib/$(TARGET)" "$(INSTALL_ROOT)/lib/$(TARGET1)" | ||
-$(SYMLINK) "$(INSTALL_ROOT)/lib/$(TARGET)" "$(INSTALL_ROOT)/lib/$(TARGET2)" | ||
-$(SYMLINK) "$(INSTALL_ROOT)/lib/$(TARGET)" "$(INSTALL_ROOT)/lib/$(TARGET3)" | ||
|
||
# copy the headers into the include directory | ||
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include || $(MKDIR) $(INSTALL_ROOT)/include | ||
$(CP_ALL) $(DIR_DXL)/include/* $(INSTALL_ROOT)/include/ | ||
|
||
$(LD_CONFIG) | ||
|
||
uninstall: | ||
$(RM) $(INSTALL_ROOT)/lib/$(TARGET) | ||
$(RM) $(INSTALL_ROOT)/lib/$(TARGET1) | ||
$(RM) $(INSTALL_ROOT)/lib/$(TARGET2) | ||
$(RM) $(INSTALL_ROOT)/lib/$(TARGET3) | ||
|
||
$(RM) $(INSTALL_ROOT)/include/DynamixelSDK.h | ||
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk* | ||
|
||
reinstall: uninstall install | ||
|
||
|
||
#--------------------------------------------------------------------- | ||
# Make rules for all .c and .cpp files in each directory | ||
#--------------------------------------------------------------------- | ||
|
||
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.c | ||
$(CC) $(CCFLAGS) -c $? -o $@ | ||
|
||
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.cpp | ||
$(CX) $(CXFLAGS) -c $? -o $@ | ||
|
||
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk_linux/%.c | ||
$(CC) $(CCFLAGS) -c $? -o $@ | ||
|
||
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk_linux/%.cpp | ||
$(CX) $(CXFLAGS) -c $? -o $@ | ||
|
||
#--------------------------------------------------------------------- | ||
# END OF MAKEFILE | ||
#--------------------------------------------------------------------- |
Oops, something went wrong.