hm@28: # Comment/uncomment the following line to disable/enable debugging hm@28: #DEBUG = y fp@9: fp@9: hm@28: # Add your debugging flag (or not) to CFLAGS hm@28: ifeq ($(DEBUG),y) hm@28: DEBFLAGS = -O -g -DSHORT_DEBUG # "-O" is needed to expand inlines fp@9: else hm@28: DEBFLAGS = -O2 fp@9: endif fp@0: hm@28: CFLAGS += $(DEBFLAGS) hm@28: CFLAGS += -I.. hm@28: hm@28: RTLIB = /vol/projekte/msr_messen_steuern_regeln/linux/kernel_space/rt_lib-4.0.0-2.6krnl fp@0: fp@9: #Suchpfad für die Dateien aus dem RT-Lib-Verzeichnis hm@28: VPATH := $(RTLIB)/msr-core:$(RTLIB)/msr-control:$(RTLIB)/msr-hwdriver:$(RTLIB)/msr-math:$(RTLIB)/msr-misc:$(RTLIB)/msr-utils fp@0: hm@28: #Datei aus dem RT-Libverzeichnis für dies Projekt hm@28: RTSRC := msr_main.o msr_lists.o msr_charbuf.o msr_reg.o msr_interpreter.o msr_utils.o msr_messages.o msr_functiongen.o msr_base64.o msr_watchdog.o msr_proc.o msr_error_reg.o fp@0: hm@28: ifneq ($(KERNELRELEASE),) hm@28: # call from kernel build system fp@0: fp@0: hm@28: EXTRA_CFLAGS := -I$(RTLIB)/msr-include -D_SIMULATION -I/usr/include -mhard-float fp@9: hm@28: #EXTRA_LDFLAGS := -L/usr/lib -lm fp@9: hm@28: msr_modul-y := msr_module.o \ hm@28: msr_jitter.o \ hm@28: rt_lib/msr-core/msr_lists.o \ hm@28: rt_lib/msr-core/msr_main.o \ hm@28: rt_lib/msr-core/msr_charbuf.o \ hm@28: rt_lib/msr-core/msr_reg.o \ hm@28: rt_lib/msr-core/msr_interpreter.o \ hm@28: rt_lib/msr-core/msr_messages.o \ hm@28: rt_lib/msr-core/msr_proc.o \ hm@28: rt_lib/msr-core/msr_error_reg.o \ hm@28: rt_lib/msr-utils/msr_utils.o \ hm@28: rt_lib/msr-math/msr_base64.o \ hm@28: libm.o hm@28: hm@28: hm@28: obj-m := msr_modul.o hm@28: hm@28: hm@28: hm@28: else hm@28: hm@28: hm@28: KERNELDIR := /lib/modules/$(shell uname -r)/build hm@28: PWD := $(shell pwd) hm@28: hm@28: hm@28: hm@28: hm@28: default: hm@28: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules hm@28: hm@28: endif hm@28: hm@28: hm@28: clean: hm@28: rm -f core .depend hm@28: rm -rf .tmp_versions hm@28: find -L -maxdepth 3 -name "*.o" -exec rm {} \; hm@28: find -L -maxdepth 3 -name "*~" -exec rm {} \; hm@28: find -L -maxdepth 3 -name "*.cmd" -exec rm {} \; hm@28: find -L -maxdepth 3 -name "*.ko" -exec rm {} \; hm@28: find -L -maxdepth 3 -name "*.mod.c" -exec rm {} \; fp@9: fp@9: depend .depend dep: hm@28: $(CC) $(CFLAGS) -M *.c > .depend fp@9: fp@9: fp@10: fp@10: ifeq (.depend,$(wildcard .depend)) fp@10: include .depend fp@10: endif