drivers/unix/Makefile.in
changeset 629 b9274b595650
parent 391 7802a7d5584f
child 658 7758d60e9260
equal deleted inserted replaced
628:9e496a2aadca 629:b9274b595650
     1 #! gmake
     1 #! gmake
     2 
     2 
     3 #
     3 #
     4 # Copyright (C) 2006 Laurent Bessard
     4 # Copyright (C) 2006 Laurent Bessard
     5 # 
     5 #
     6 # This file is part of canfestival, a library implementing the canopen
     6 # This file is part of canfestival, a library implementing the canopen
     7 # stack
     7 # stack
     8 # 
     8 #
     9 # This library is free software; you can redistribute it and/or
     9 # This library is free software; you can redistribute it and/or
    10 # modify it under the terms of the GNU Lesser General Public
    10 # modify it under the terms of the GNU Lesser General Public
    11 # License as published by the Free Software Foundation; either
    11 # License as published by the Free Software Foundation; either
    12 # version 2.1 of the License, or (at your option) any later version.
    12 # version 2.1 of the License, or (at your option) any later version.
    13 # 
    13 #
    14 # This library is distributed in the hope that it will be useful,
    14 # This library is distributed in the hope that it will be useful,
    15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    17 # Lesser General Public License for more details.
    17 # Lesser General Public License for more details.
    18 # 
    18 #
    19 # You should have received a copy of the GNU Lesser General Public
    19 # You should have received a copy of the GNU Lesser General Public
    20 # License along with this library; if not, write to the Free Software
    20 # License along with this library; if not, write to the Free Software
    21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    22 # 
    22 #
    23 
    23 
    24 #ifneq ($(KERNELRELEASE),)
    24 #ifneq ($(KERNELRELEASE),)
    25 # Kbuild part of Makefile
    25 # Kbuild part of Makefile
    26 obj-m := libcanfestival_$(TARGET).o
    26 obj-m := libcanfestival_$(TARGET).o
    27 libcanfestival_$(TARGET)-objs := $(OBJS)
    27 libcanfestival_$(TARGET)-objs := $(OBJS)
    54 TARGET_HFILES = $(PREFIX)/include/$(TARGET)/applicfg.h $(PREFIX)/include/$(TARGET)/canfestival.h
    54 TARGET_HFILES = $(PREFIX)/include/$(TARGET)/applicfg.h $(PREFIX)/include/$(TARGET)/canfestival.h
    55 
    55 
    56 all: driver
    56 all: driver
    57 
    57 
    58 ifeq ($(TIMERS_DRIVER), timers_kernel)
    58 ifeq ($(TIMERS_DRIVER), timers_kernel)
       
    59 USE_KERNEL_TIMER = true
       
    60 endif
       
    61 ifeq ($(TIMERS_DRIVER), timers_kernel_xeno)
       
    62 USE_KERNEL_TIMER = true
       
    63 endif
       
    64 
       
    65 ifeq ($(USE_KERNEL_TIMER), true)
    59 OBJS := $(shell echo $(OBJS) | sed "s:$(TARGET)_::g")
    66 OBJS := $(shell echo $(OBJS) | sed "s:$(TARGET)_::g")
    60 EXTRA_CFLAGS := $(shell echo $(INCLUDES) | sed "s:-I:-I$(src)/:g")
    67 EXTRA_CFLAGS := $(shell echo $(INCLUDES) | sed "s:-I:-I$(src)/:g")
    61 EXTRA_CFLAGS += $(PROG_CFLAGS)
    68 EXTRA_CFLAGS += $(PROG_CFLAGS)
    62 KERNELDIR := SUB_KERNELDIR
    69 KERNELDIR := SUB_KERNELDIR
    63 export TARGET
    70 export TARGET
    73 clean:
    80 clean:
    74 	$(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean
    81 	$(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean
    75 	rm -f Module.symvers
    82 	rm -f Module.symvers
    76 
    83 
    77 install:
    84 install:
    78 	
    85 
    79 
    86 
    80 else
    87 else
    81 CFLAGS = SUB_OPT_CFLAGS
    88 CFLAGS = SUB_OPT_CFLAGS
    82 
    89 
    83 driver: $(OBJS)
    90 driver: $(OBJS)