Hi! This is a question to all autoconf/automake experts out here. I have a package which has kernelmode modules and usermode programs. Now both of them use a common library file which can be compiled into either kernel mode or userland mode, depending on which it is being linked against. How do I define using automake definitions to get this file compiled twice - once in kernel mode and once in userland mode?
e.g. my package tree looks like this: $(top_srcdir) | +------- common/ : commonlib.c | +------- kernel/ : kernelmod.c | +------- user/ : userprog.c Now the kernel module needs to be linked with commonlib.o AFTER commonlib.c has been compiled using Kernel module directives. (-D__KERNEL -DMODULE -O2 etc.) userprog application needs to be linked with commonlib.o AFTER commonlib.c has been compiled using normal directives. How do I get commonlib.c to be compiled twice using different options. If I use the following definitions, it is flagged as an error because the object file is not created in the current directory. user/Makefile.am: bin_PROGRAMS = userprog userprog_SOURCES = ../common/commonlib.c - Sandip -- Sandip Bhattacharya sandipb @ bigfoot.com http://www.sandipb.net ---------------------------- ================================================ To subscribe, send email to [EMAIL PROTECTED] with subscribe in subject header To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header Archives are available at http://www.mail-archive.com/ilugd%40wpaa.org =================================================