0
|
1 |
#----------------------------------------------------------------
|
|
2 |
#
|
|
3 |
# Makefile
|
|
4 |
#
|
|
5 |
# Minimales EtherCAT-Modul
|
|
6 |
#
|
|
7 |
# $Id$
|
|
8 |
#
|
|
9 |
#----------------------------------------------------------------
|
|
10 |
|
|
11 |
MSRDIR = /vol/projekte/msr_messen_steuern_regeln
|
|
12 |
KERNELDIR = $(MSRDIR)/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5
|
|
13 |
CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include
|
|
14 |
|
|
15 |
MODULE = ec_mini_mod.o
|
|
16 |
|
|
17 |
SRC = ec_mini.c
|
|
18 |
OBJ = $(SRC:.c=.o)
|
|
19 |
|
|
20 |
#----------------------------------------------------------------
|
|
21 |
|
|
22 |
all: .depend Makefile $(MODULE)
|
|
23 |
|
|
24 |
$(MODULE): $(OBJ)
|
|
25 |
$(LD) -r $(OBJ) -o $@
|
|
26 |
|
|
27 |
#----------------------------------------------------------------
|
|
28 |
|
|
29 |
depend .depend dep:
|
|
30 |
$(CC) $(CFLAGS) -M $(SRC) > .depend
|
|
31 |
|
|
32 |
ifeq (.depend,$(wildcard .depend))
|
|
33 |
include .depend
|
|
34 |
endif
|
|
35 |
|
|
36 |
#----------------------------------------------------------------
|
|
37 |
|
|
38 |
clean:
|
|
39 |
rm -f *.o *~ core .depend
|
|
40 |
|
|
41 |
#----------------------------------------------------------------
|