• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

make install

mkdir Test-n.m-build
cd Test-n.m-build
../Test-n.m/configure --prefix=installdir
make check
make install

what is those, i have a C++ code and need to make somthing installer above for that C code. how to do that, i have no idea. can anyone pls help me?
2 Solutions
man mkdir
man cd
man make
configure is a script that get the appropriate configuration options for your environment to build a makefile
there are lots of installation strategies, most common are: Imakefile, configure, SConstruct.
Imakefile is outdated and was used for X
SConstruct is a nice python implementation of configure
configure are the standard of art nowadays.
Configure depends on some files:

from configure.in it creates a script named configure. The exactly syntax from configure.in you can take from tutorials but also from other projects.

configure make some test, like compiling files with libraries or flags, linking packages, etc. it then creates from Makefile.am and Makefile.in a Makefile.

Normally you need just to create MAkefile.am and configure.in, the autogen.sh has normally 3 lines (automake, autoconf and someother normal script). Makefile.am is based normally on the Makefile of your configuration plus some key flags and conditions to adapt it to the target system. in configure.in is the most work to be done. There you must specify which autoconf version is needed, which libraries do you need and include flies, where to install (this can  be also made in Makefile.am) and show some info about the options chossen.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now