I need to create a makefile for my project. We need to use options in
such a way that executable files, source files and obj files will be stored
in separate directories. How to route obj files to a specfic directory
(which is not same as diretory in which source code is stored)?
I need to create a makefile for my project. We need to use options in
such a way that executable files, source files and obj files will be
stored
in separate directories. How to route obj files to a specfic directory
(which is not same as diretory in which source code is stored)?
There are many ways to do this: here is what I do:
First I defined the target as:
$(target): $(addprefix $(objpath)/,$(object)) $(EXTRALIBS) usage
I need to create a makefile for my project. We need to use options in
such a way that executable files, source files and obj files will be
stored
in separate directories. How to route obj files to a specfic directory
(which is not same as diretory in which source code is stored)?
Sorry for other post I hit a wrong key:
Here is a very strip down version of a Makefile file I sometime use under
QNX4
INCPATH defines location of header files. OBJPATH defines location of
object
files. TARGET is the full path of where to store the executable
I like to have my makefile automaticaly build list of object files from the
sources in the directory, but I wanted to keep things simple here.
Check out use of vpath to tell make where to search for certain files.
Personnaly I have not yet master the use of vpath and have manage
without it