Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3949606
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:30:48+00:00 2026-05-20T01:30:48+00:00

Did anyone know how to write Check makefile.am if we have more than *.c

  • 0

Did anyone know how to write Check makefile.am if we have more than *.c file in the test code? Example:

#include "../src/SpeedGauge.h"
#include "../src/CruiseManager.h"
#include "../src/Throttle.h"

SpeedGauge speedo;
CruiseManager controller;
Throttle throttle;

/* Test case for  - Case1 */
START_TEST (test_Case1)
{
    int expected = 11; // TODO: Initialize to an appropriate value
    speedo.time = 1111; // TODO: Initialize to an appropriate value
    speedo.rotaryCount = 3333; // TODO: Initialize to an appropriate value

    // tick: 1
    SpeedGauge_calcSpeed(&speedo);
    CruiseManager_set(&controller);
    Throttle_normal(&throttle);

    int result = throttle.throttleVal;

    fail_unless (result == expected, "Expecting <%i> instead of <%i>", expected, result);
}
END_TEST

This is my makefile.am:

## Process this file with automake to produce Makefile.in

lib_LTLIBRARIES = libSpeedGauge.la libCruiseManager.la libThrottle.la
libSpeedGauge_la_SOURCES = SpeedGauge.c SpeedGauge.h CruiseManager.c CruiseManager.h Throttle.c Throttle.h

bin_PROGRAMS = main
main_SOURCES = main.c
main_LDADD = libSpeedGauge.la libCruiseManager.la libThrottle.la

I got an error saying this:

libtool: link: ranlib .libs/libSpeedGauge.a
libtool: link: ( cd ".libs" && rm -f "libSpeedGauge.la" && ln -s "../libSpeedGauge.la" "libSpeedGauge.la" )
make[2]: *** No rule to make target `libCruiseManager.lo', needed by `libCruiseManager.la'.  Stop.
make[2]: Leaving directory `/home/mjaa001/Desktop/cruisecontrol/src'
make[1]: *** [all-recursive] Error 1

It seem that it can’t link the compile code. Did I specify the lib class wrongly or I need a single class file only?

Update

Solve by editing the makefile.am from

libSpeedGauge_la_SOURCES = SpeedGauge.c SpeedGauge.h CruiseManager.c CruiseManager.h Throttle.c Throttle.h

to

libSpeedGauge_la_SOURCES = SpeedGauge.c SpeedGauge.h
libCruiseManager_la_SOURCES = CruiseManager.c CruiseManager.h
libThrottle_la_SOURCES = Throttle.c Throttle.h
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:30:49+00:00Added an answer on May 20, 2026 at 1:30 am
    lib_LTLIBRARIES = libSpeedGauge.la libCruiseManager.la libThrottle.la
    
    libCruiseManager_la_SOURCES = ...
    

    or

    ## Process this file with automake to produce Makefile.in
    
    lib_LTLIBRARIES = libSpeedGauge.la
    libSpeedGauge_la_SOURCES = SpeedGauge.c CruiseManager.c Throttle.c
    
    bin_PROGRAMS = main
    main_SOURCES = main.c
    main_LDADD = libSpeedGauge.la
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know what pg_catalog.setval does? I just did a dump off a PostgreSQL
I did a little research and I didn't find a way, anyone know? c#
Did anyone integrated Amobee SDK into Android application on ActionScript or Java? I have
Hiphop converts PHP into C++ code, did anyone used it for PHP extension development?
Did anyone tried to customize the window in which the quicktime is playing video?
Has anyone integrated an iPhone application with a Shibboleth Identity Provider? Googling did not
I wonder if anyone tried using Kaazing for client push with Silverlight? How did
Did any one have luck recently register Visual studio 2008 express C# product? Look
Did you ever have the following situation: you need to store information, but a
I want to write a code to search for method defination and methods called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.