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