Results 1 to 2 of 2

Thread: Fix it to use EXTRA CFLAGS

  1. #1
    Join Date
    Jun 2007
    Location
    The Mistake by the Lake
    Beans
    1,813

    Fix it to use EXTRA CFLAGS

    I'm trying to compile a driver I keep getting errors about CFLAGS was changed Fix it to use EXTRA CFLAGS the make file looks like this

    #************************************************* **************************
    # Makefile to build Driver executable
    #************************************************* **************************

    PWD := $(shell pwd)
    INCLUDES = -I $(KERNEL_SOURCE_PATH)/include -I$(PWD)/../inc
    #if no kernel source path was specified, correct INCLUDES to reflect that
    ifeq ($(KERNEL_SOURCE_PATH),)
    INCLUDES = -I /lib/modules/`uname -r`/build/include -I ../inc
    endif
    CFLAGS += $(PSTN_DEF) -Wall -O $(INCLUDES) -fno-common -DTARGET_CATAWBA

    DRIVER_OBJS = coredrv.o clmmain.o rts.o task.o uart.o wwh_dflt.o locks.o \
    softserial_io.o softserial_ioctl.o softserial.o
    537_OBJS = $(DRIVER_OBJS) afedsp_int.o

    clean:
    rm -f *.ko *.o *~ core

    537core_26:
    $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

    537core: $(537_OBJS)
    strip --strip-debug 537core.lib
    $(LD) -r $(537_OBJS) 537core.lib -o Intel537.o

    KDIR := /lib/modules/$(shell uname -r)/build

    obj-m := Intel537.o

    Intel537-objs := $(537_OBJS) 537core.lib

    __________________________________________________ _______________________

    Any ideas?
    Quote Originally Posted by Homer J. Simpson
    "Dinner is the perfect break between work, and drunk."


  2. #2
    Join Date
    Apr 2007
    Beans
    281
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Fix it to use EXTRA CFLAGS

    change

    CFLAGS += $(PSTN_DEF) -Wall -O $(INCLUDES) -fno-common -DTARGET_CATAWBA

    to

    EXTRA_CFLAGS += $(PSTN_DEF) -Wall -O $(INCLUDES) -fno-common -DTARGET_CATAWBA

    and try ;o

    you could use something like this:
    sed -i 's/^CFLAGS/EXTRA_CFLAGS/' Makefile

    it worked for me
    Last edited by smo0th; December 24th, 2011 at 05:46 PM.
    .:it's all about true or false, so be true to life:.
    linux community is the best
    ubuntu ftw <3

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •