I have the following: a .c code, a .h code plus a .o file and a -lib… library. When I compile the c code with gcc I do:
gcc code.c -o code file.o -library
How to create a makefile?
I currently have with autoconf and automake?
I currently have:
Makefile
all:
gcc code.c -o code file.o -library
clean:
rm -f code
When I compile make I get:
make: Nothing to be done for `all'.
Need some help. Thx
I’m sorry I have to give this answer, but have you tried https://www.google.com/search?q=makefile+tutorial?
Pick one, and learn how to create a Makefile. You don’t need the autotools.
It took me 5 minutes to come up with this, by reading Makefile Tutorial:
This is specific to the distribution used and you need root access on the machine. Doing it like this is not how it’s done. Instead, you should create a package specific for your distribution where you specify the dependencies.
For instance, for Ubuntu (since it’s the most used distribution), you’d create a .deb file: http://wiki.debian.org/IntroDebianPackaging
This, however, has nothing to do with your initial question.