Makefile 876 Bytes
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

CFLAGS= -Wall -O3 \
	-I. -I.. -I../log -I../controller
LDFLAGS= -lpthread -lrt -ldl -lm 

LIBSRCS= ec.c esc.c canopen.c ec_stoeber.c block_ec.c
LIBOBJS= $(LIBSRCS:.c=.o)

BLOCKSRCS= \
	block_beckhoff_el1xxx.c \
	block_beckhoff_el2xxx.c \
	block_beckhoff_el2502.c \
	block_beckhoff_el3xxx.c \
	block_beckhoff_el4xxx.c \
	block_beckhoff_el5001.c \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
16
17
	block_beckhoff_el5101.c \
	block_stoeber.c
Jeroen Vreeken's avatar
Jeroen Vreeken committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

BLOCKS=$(BLOCKSRCS:.c=.o)
SRCS=$(BLOCKSRCS) $(LIBSRCS)

all: $(LIBOBJS) $(BLOCKS) ec_test.o eclib ec_enum ec_el_test

eclib: ec.a($(LIBOBJS) $(BLOCKS))

ec_enum: ec_enum.o ec.a ../log/log.a ../controller/controller.a

ec_enum.o: esc_id.h

ec_el_test_LDFLAGS:= `../controller/block_list.sh ec.a ../controller/controller.a` -Wl,-E
ec_el_test: ec_el_test.o ec.a ../controller/controller.a ../log/log.a ../shell/shell.a

clean:
	rm -rf *.o *.a *.d ec_enum ec_el_test

include ../build.mk