Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] How to get something like uname -r into managed makefile (CDT) under linux

Hi Johann,

 

You better ask the questions like this to the newsgroup since this list is for CDT developer discussions only.

The answer to your question actually depends on the way you are using the CDT build functionality, i.e. “standard” vs “managed” build, etc.

 

Regards,

Mikhail

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Johann Horvat
Sent: Friday, April 20, 2007 8:43 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] How to get something like uname -r into managed makefile (CDT) under linux

 

Dear Jguru People,

I have a C Project, which target is a executable for linux x86 and a kernel module for 2.6. I want to try to get it compile under eclipse/cdt... My existing makefile looks like this:

 
obj-m   := rt_process.o
 
KDIR    := /lib/modules/$(shell uname -r)/build
PWD            := $(shell pwd)
EXTRA_CFLAGS := -I/usr/realtime/include -I/usr/include/ -ffast-math -mhard-float
 
default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
        gcc -o scope scope.c
 
clean:
        rm *.o
        rm *.ko

As you can see I use bash specific things like $(shell uname -r) to determine the running kernel.

How can I achieve this with the project settings dialog of eclipse?

Thank you
Johann


View this message in context: How to get something like uname -r into managed makefile (CDT) under linux
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.


Back to the top