mini/Makefile
author Florian Pose <fp@igh-essen.com>
Tue, 12 Jan 2010 23:40:37 +0100
branchkernel-2.4
changeset 1766 9e4d4306b641
parent 16 f04e93b8af0f
child 22 e8c2cd004e0b
permissions -rw-r--r--
Closed branch.
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#----------------------------------------------------------------
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#  Makefile
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
#  Minimales EtherCAT-Modul
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
#  $Id$
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
#----------------------------------------------------------------
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
16
f04e93b8af0f ?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    11
CONFIG_FILE = ../ethercat.conf
5
6f2508af550c Alle ?nderungen aus den Branches no_rtai und no_int nach Trunk portiert.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    12
16
f04e93b8af0f ?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    13
ifeq ($(CONFIG_FILE),$(wildcard $(CONFIG_FILE)))
f04e93b8af0f ?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    14
include $(CONFIG_FILE)
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    15
else
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    16
KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    17
RTAIDIR   = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13
16
f04e93b8af0f ?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    18
RTLIBDIR  = rt_lib
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    19
endif
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    20
5
6f2508af550c Alle ?nderungen aus den Branches no_rtai und no_int nach Trunk portiert.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    21
CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ \
6f2508af550c Alle ?nderungen aus den Branches no_rtai und no_int nach Trunk portiert.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    22
	-DMODULE -I$(KERNELDIR)/include
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
MODULE = ec_mini_mod.o
5
6f2508af550c Alle ?nderungen aus den Branches no_rtai und no_int nach Trunk portiert.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    25
SRC = ec_mini.c
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
OBJ = $(SRC:.c=.o)
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
#----------------------------------------------------------------
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    30
all: .output_dirs .depend Makefile $(MODULE)
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
$(MODULE): $(OBJ)
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
	$(LD) -r $(OBJ) -o $@
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    35
.output_dirs:
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    36
	@echo "x-- Directories -------------"
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    37
	@echo "| Kernel $(KERNELDIR)"
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    38
	@echo "| RTAI   $(RTAIDIR)"
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    39
	@echo "| RT_lib $(RTLIBDIR)"
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 5
diff changeset
    40
	@echo "x----------------------------"
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
depend .depend dep:
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
	$(CC) $(CFLAGS) -M $(SRC) > .depend
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
clean:
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
	rm -f *.o *~ core .depend
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
#----------------------------------------------------------------
10
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    49
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    50
ifeq (.depend,$(wildcard .depend))
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    51
include .depend
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    52
endif
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    53
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    54
#----------------------------------------------------------------