rs232dbg/Makefile
changeset 5 6f2508af550c
parent 0 05c992bf5847
child 9 144d220c8ca0
equal deleted inserted replaced
4:394c89f02e48 5:6f2508af550c
     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 
     1 
     6 #euler-nottuln
     2 MSRDIR = /vol/projekte/msr_messen_steuern_regeln
     7 #KERNELDIR = /usr/src/linux
     3 ECATDIR = $(MSRDIR)/ethercat
     8 #RTAIDIR = /usr/src/rtai
       
     9 
     4 
    10 #patra
     5 KERNELDIR = $(ECATDIR)/linux-2.4.20.CX1100-rthal5-kdb
    11 #KERNELDIR = /usr/src/linux-2.4.20.CX1100-rthal5
     6 RTAIDIR   = $(MSRDIR)/linux/kernel/2.4.20/include/rtai-24.1.13
    12 #RTAIDIR   = /usr/src/rtai-24.1.13
       
    13 
     7 
    14 RTLIBDIR=rt_lib
     8 CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ -DMODULE \
    15 
     9 	-I$(KERNELDIR)/include -D_RTAI -I$(RTAIDIR)/include -I$(RTLIBDIR)/msr-include
    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 
    10 
    29 TARGET = sdbg
    11 TARGET = sdbg
    30 MODULE = $(TARGET).o
    12 MODULE = $(TARGET).o
    31 
    13 
    32 SRC = rs232dbg.c aip_com.c
    14 SRC = rs232dbg.c aip_com.c
    33 
    15 
    34 #Suchpfad für die Dateien aus dem RT-Lib-Verzeichnis
    16 ALLSRC = $(SRC)
    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 
    17 
    42 OBJS = $(ALLSRC:.c=.o)  
    18 OBJS = $(ALLSRC:.c=.o)  
    43 
       
    44 
    19 
    45 all: .depend $(TARGET).o Makefile
    20 all: .depend $(TARGET).o Makefile
    46 
    21 
    47 $(TARGET).o: $(SRC:.c=.o) $(RTSRC:.c=.o)
    22 $(TARGET).o: $(SRC:.c=.o) $(RTSRC:.c=.o)
    48 	$(LD) -r $(OBJS)  -o $@ $(LDFLAGS)
    23 	$(LD) -r $(OBJS)  -o $@ $(LDFLAGS)
    55 	rm -f *.o *~ core .depend
    30 	rm -f *.o *~ core .depend
    56 
    31 
    57 depend .depend dep:
    32 depend .depend dep:
    58 	$(CC) $(CFLAGS) -M *.c > $@
    33 	$(CC) $(CFLAGS) -M *.c > $@
    59 
    34 
    60 
       
    61 
       
    62 
       
    63 ifeq (.depend,$(wildcard .depend))
    35 ifeq (.depend,$(wildcard .depend))
    64 include .depend
    36 include .depend
    65 endif
    37 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