rt/Makefile
changeset 0 05c992bf5847
child 9 144d220c8ca0
equal deleted inserted replaced
-1:000000000000 0:05c992bf5847
       
     1 #IgH
       
     2 KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5
       
     3 RTAIDIR   = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13
       
     4 RTLIBDIR = rt_lib
       
     5 
       
     6 #euler-nottuln
       
     7 #KERNELDIR = /usr/src/linux
       
     8 #RTAIDIR = /usr/src/rtai
       
     9 
       
    10 
       
    11 #patra
       
    12 #KERNELDIR = /usr/src/linux-2.4.20.CX1100-rthal5
       
    13 #RTAIDIR   = /usr/src/rtai-24.1.13
       
    14 
       
    15 RTLIBDIR=rt_lib
       
    16 
       
    17 #include $(KERNELDIR)/.config
       
    18 
       
    19 #CFLAGS = -DRTAI -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -I$(RTAIDIR)/include -I$(RTLIBDIR)/msr-include \
       
    20 #	-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer \
       
    21 #	-pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include
       
    22 
       
    23 CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ -DMODULE -DSERIALDEBUG -DMSR_NO_PROC -I$(KERNELDIR)/include -D_RTAI -I$(RTAIDIR)/include -I$(RTLIBDIR)/msr-include
       
    24 
       
    25 #CFLAGS += -DSIMULATION
       
    26 #LDFLAGS = 
       
    27 
       
    28 #VPATH = $(RTLIBDIR)/
       
    29 
       
    30 TARGET = msr_modul
       
    31 MODULE = $(TARGET).o
       
    32 
       
    33 SRC = msr_io.c 
       
    34 
       
    35 #Suchpfad für die Dateien aus dem RT-Lib-Verzeichnis
       
    36 VPATH = $(RTLIBDIR)/msr-core:$(RTLIBDIR)/msr-control:$(RTLIBDIR)/msr-math:$(RTLIBDIR)/msr-misc:$(RTLIBDIR)/msr-utils
       
    37 
       
    38 #Datei aus dem RT-Libverzeichnis für dies Projekt
       
    39 RTSRC = msr_main.c msr_lists.c msr_charbuf.c msr_reg.c msr_interpreter.c msr_utils.c msr_messages.c msr_base64.c msr_proc.c msr_error_reg.c
       
    40 
       
    41 ALLSRC = $(SRC) $(RTSRC)
       
    42 
       
    43 OBJS = $(ALLSRC:.c=.o)  
       
    44 
       
    45 
       
    46 all: .depend $(TARGET).o Makefile
       
    47 
       
    48 $(TARGET).o: $(SRC:.c=.o) $(RTSRC:.c=.o)
       
    49 	$(LD) -r $(OBJS)  -o $@ $(LDFLAGS)
       
    50 
       
    51 install: msr_modul.o
       
    52 	lsmod | grep cif-rtai >/dev/null 2>&1 && sudo rmmod msr_modul || true
       
    53 	sudo insmod msr_modul.o
       
    54 
       
    55 clean:
       
    56 	rm -f *.o *~ core .depend
       
    57 
       
    58 depend .depend dep:
       
    59 	$(CC) $(CFLAGS) -M *.c > $@
       
    60 
       
    61 
       
    62 
       
    63 
       
    64 ifeq (.depend,$(wildcard .depend))
       
    65 include .depend
       
    66 endif
       
    67 
       
    68 
       
    69 #all: msr_module.o
       
    70 #
       
    71 #msr_io.o: msr_io.c msr_io.h
       
    72 #	$(CC) $(CFLAGS) -c -o $@ $<
       
    73 #
       
    74 #msr_module.o: msr_io.o
       
    75 #	$(LD) -r -o $@ $^
       
    76 #
       
    77 
       
    78 #                  $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
       
    79 
       
    80 
       
    81 #clean:
       
    82 #	rm -f *.o *~ core
       
    83