Makefiles

Hi All,

I was going through some makefiles where I saw occurrences of explib_subdirs and expinc_subdirs, which I could not understand.

Exporting libs to subdirs ? Exporting include files to specified subdirs ? When do we need to do that ?

What I could understand is, for a build, I would need libraries, but what is getting exported ?

Thanks,
Rohit

Without seeing the makefile (and, maybe also seeing some of the source files being processed by those targets) there is no way to give a definitive answer. You assume that exp is an abbreviation of export. I would have made a 1st guess that it was an abbreviation of experimental. Maybe they are for libraries and include files developed by someone with the initials EXP. I'm sure there are lots of other possibilities.

Thanks for responding.
May be this could be of some help:

.if (${TARGET_MACHINE} == "LINUX")
EXPLIB_SUBDIRS+= abc sprc cpd
SUBDIRS+= \
    cpd \
    abc \
    sprc \
    generic
.else
/* some code */
.endif

Also, I found the following from OSF Development Environment User�s Guide:
SUBDIRS The list of sub-directories to to be searched.
EXPINC_SUBDIRS The list of sub-directories which should be searched for
include files to export.
EXPLIB_SUBDIRS The list of sub-directories which should be searched for
libraries to export.

Thanks.

Hi,

EXPLIB_SUBDIRS+= abc sprc cpd

appending the list of directories to a variable EXPLIB_SUBDIRS in above line.

IMO, what (external) libraries , include files , header files are to be included depends on respective project as above variable is not default/special variable.

hi,

Ofcourse, abc, sprd, cpd are variables. That is already understood.

EXPLIB_SUBDIRS :

EXP = Export
LIB = Libraries
SUBDIRS = Sub-directories to be searched for the libraries.

What I am unable to understand is what is getting "exported" ? Importing libs or includes, for a second, makes sense. One might need to link the program and the libraries and for that purpose, the libs and include files could be imported from the same directory or the sub-directories.

Thanks.

---------- Post updated at 03:58 PM ---------- Previous update was at 03:37 PM ----------

Hi All,

Answering my own question:

The concept of export is related to Sandboxing and backing tree. Export is a directory in which all the required libraries and include files from the original source are copied into. So, by EXPLIB_SUBDIRS = abc def, it is meant that copy the required libs from the sub-directories abc, def to the EXPORT directory for linking.
This way only the required libs are imported in the EXPORT directory.

Please improve the answer or let me know if there is some gap in my understanding.

Thanks for your answers.

1 Like