1
0
Fork 0
CANopenNode/Makefile
Martin Wagner 03982ad8e3 First try on LSS slave addon...
- needs #define CO_NO_LSS_SERVER 1 in CO_OD.h. This will need a change in the OD editor.
- no Fastscan support yet
- bitrate setting API untested
- https://github.com/CANopenNode/CANopenNode/issues/46 (driver stuff)
- changed some of the other stack files, tried my best to remain compatible with standard non LSS CANopenNode
2017-06-26 13:04:02 +02:00

54 lines
1.3 KiB
Makefile

# Makefile for CANopenNode, basic compile with no CAN device.
STACKDRV_SRC = stack/drvTemplate
STACK_SRC = stack
CANOPEN_SRC = .
APPL_SRC = example
LINK_TARGET = canopennode
INCLUDE_DIRS = -I$(STACKDRV_SRC) \
-I$(STACK_SRC) \
-I$(CANOPEN_SRC) \
-I$(APPL_SRC)
SOURCES = $(STACKDRV_SRC)/CO_driver.c \
$(STACKDRV_SRC)/eeprom.c \
$(STACK_SRC)/crc16-ccitt.c \
$(STACK_SRC)/CO_SDO.c \
$(STACK_SRC)/CO_Emergency.c \
$(STACK_SRC)/CO_NMT_Heartbeat.c \
$(STACK_SRC)/CO_SYNC.c \
$(STACK_SRC)/CO_PDO.c \
$(STACK_SRC)/CO_HBconsumer.c \
$(STACK_SRC)/CO_SDOmaster.c \
$(STACK_SRC)/CO_LSSmaster.c \
$(STACK_SRC)/CO_LSSslave.c \
$(STACK_SRC)/CO_trace.c \
$(CANOPEN_SRC)/CANopen.c \
$(APPL_SRC)/CO_OD.c \
$(APPL_SRC)/main.c
OBJS = $(SOURCES:%.c=%.o)
CC = gcc
CFLAGS = -Wall $(INCLUDE_DIRS)
LDFLAGS =
.PHONY: all clean
all: clean $(LINK_TARGET)
clean:
rm -f $(OBJS) $(LINK_TARGET)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
$(LINK_TARGET): $(OBJS)
$(CC) $(LDFLAGS) $^ -o $@