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

  • SEARCH
  • Home
  • 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 7414913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:11:49+00:00 2026-05-29T07:11:49+00:00

This is my homework. I’m looking for help on how to a make a

  • 0

This is my homework. I’m looking for help on how to a make a “makefile” that will compile three source files. Of which will be named “timestable.c tablein.c tableout.c timestable.h”. Those are the four source files. I have created a makefile to do this, which I believe is correct, but I’m not sure how to test it to see if it will compile? Here is the content of my makefile:

timestable.exe: timestable.c tablein.c tableout.c timestable.h
    cl timestable.c tablein.c tableout.c timestable.h 

Is this correct? This makefile has to build a program called timestable.exe using the Visual Studio cl command and to provide the clean functionality. I don’t understand what I am being told when the teacher mentioned the “clean” functionality. I’m not sure if this makefile actually works to create this file, because I’m not sure how to run it.

Also, if you guys don’t mind giving me a link or telling me some more info on makefile commands for a windows based system. I wish to create and “extra feature” in my makefile because doing so will grant me better marks, and I do not know what more I could do.

Thanks ahead of time.

BIG EDIT:
So, after playing around a bit, I figured out that if I change the makefile.txt file to makefile.bat and I open my visual studio cmd prompt, get into the correct directory and type in (I’m aware I do not have to run the cmd promt in order to run the .bat file) :

 makefile.bat 

it will attempt to compile all the files. The issue, is it does not work with the “.h” file, specifitcly the timestable.h file. Also, the “timestable.exe” command didn’t work. Any idea on what to do here?

  • 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-29T07:11:50+00:00Added an answer on May 29, 2026 at 7:11 am

    (Incidentally, what happens if you run cl timestable.c tablein.c tableout.c timestable.h by hand?)

    You’d normally want to write your Makefile to compile your .c files to .obj files using pattern rules that know how to compile a single .c file into an .obj file and then another rule that knows how to link all the .obj files into a single executable object. (One important benefit is that this allows rebuilding only the parts that have changed. Your Makefile so far will require recompiling all inputs file any time any one changes.)

    When you have so many .obj files laying around, you might want a make clean that removes all the object files and executable files that can be rebuilt from sources. That might be as simple as declaring clean to be a phony target and then deleting all the files that can be rebuilt.

    Note that Makefiles are by convention named Makefile or makefile or GNUmakefile. (GNU make actually searches for the files in the reverse order to this list, but Makefile is the only name I like.) If you use one of these names, then you can just run make foo to run the foo target. If you pick a different name for your Makefile then you also need to use the -f filename command line option to pick the other file, and that is annoying. Sometimes necessary.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is homework, just so that's mentioned. I have project called AdventCalendar, which is
I have this homework which required to print asterick to make draw a triangle.
I'm working on this homework that's kind of confusing me... I am provided with
Please note that this is not homework and i did search before starting this
this one is not homework, it just the fact that i've been out of
I'm stuck with this Java homework question: Write a new method, Refund, that simulates
I know that I am missing something simple here. I have got this homework
This IS NOT homework, but it is a practice that the teacher gave us
I have this homework that I gotta finish, but then something about it is
For starters this is homework, I just really need help with a binary search

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.