Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, The following is my Makefile, I wanted to add a staic library named libtimer.a. I'm using the following Makefile. Please let me know how to add this static library: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    23

    Adding a static library (libtimer.a) to the Linux Makefile


    Hi,
    The following is my Makefile, I wanted to add a staic library named libtimer.a. I'm using the following Makefile. Please let me know how to add this static library:


    Makefile:-
    all:
    gcc -Wall -lrt -lm -pthread usbserialapp.c usbserialinit.c environ.c -o usbserial
    It produces "usbserial" executable.


    Thanks,
    S

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,392
    Code:
    all:
    	gcc -Wall -lrt -lm -pthread usbserialapp.c usbserialinit.c environ.c -Bstatic -l timer -o usbserial
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Aug 2009
    Posts
    23
    Quote Originally Posted by Rubberman View Post
    Code:
    all:
    	gcc -Wall -lrt -lm -pthread usbserialapp.c usbserialinit.c environ.c -Bstatic -l timer -o usbserial
    It didn't work me either but I've found a way to do it. Thanks for your help!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •