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 57703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:43:58+00:00 2026-05-10T17:43:58+00:00

In a recent issue , I’ve found that DJGPP can only accept the DOS

  • 0

In a recent issue, I’ve found that DJGPP can only accept the DOS command line character limit. To work around this limitation, I’ve decided to try to write a makefile to allow me to pass longer strings. In the process of hacking together a makefile and testing it, I’ve come across a strange error. The makefile is as follows:

AS  :=  nasm CC  :=  gcc LD  :=  ld  TARGET      :=  $(shell basename $(CURDIR)) BUILD       :=  build SOURCES     :=  source  CFLAGS  :=  -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions \             -nostdinc -fno-builtin -I./include ASFLAGS :=  -f aout  export OUTPUT   :=  $(CURDIR)/$(TARGET)  CFILES      :=  $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) SFILES      :=  $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))  SOBJS   :=  $(SFILES:.s=.o) COBJS   :=  $(CFILES:.c=.o) OBJS    :=  $(SOBJS) $(COBJS)  build   :   $(TARGET).img  $(TARGET).img   :   $(TARGET).bin     concat.py  $(TARGET).bin   :   $(OBJS)     $(LD) -T link.ld -o $@ $^  $(SOBJS)    :   %.o :   %.asm     $(AS) $(ASFLAGS) $< -o $@  $(COBJS)    :   %.o :   %.c     $(CC) -c $< $(CFLAGS) -o $@ 

When attempting to run it, I receive this error:

make: *** No rule to make target `consoleio.c', needed by `consoleio.o'.  Stop.

What I don’t understand is why it’s trying to find a rule for .c files. From what I understand, if the file is there, it should just use it. How do I make make not need a rule for .c files?

  • 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. 2026-05-10T17:43:58+00:00Added an answer on May 10, 2026 at 5:43 pm

    What you are trying to do will not work without VPATH, and since you are still learning makefiles, I would avoid using VPATH.

    The rule is looking for ‘consoleio.c’, which if I understood your makefile correctly does not exist; what exists is ‘source/consoleio.c’. You probably should change it to something like ‘$(SOURCES)/%.c’ instead of ‘%c’.

    I didn’t check your syntax for that rule, however. If it’s incorrect, the builtin ‘%.o: %.c’ rule will be used instead, which would have the same problem.

    The way you are doing is not the usual way I’ve seen, however. The usual way is to:

    • Create an implicit rule ‘%.o: %.c’ (or in your case ‘%.o: $(SOURCES)/%.c’)
    • Explicit list the dependencies for each file: ‘foo.o: foo.c bar.h baz.h’ (with no command, the implicit rule has the command)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Related Questions

No related questions found

Sidebar

Ask A Question

Stats

  • Questions 58k
  • Answers 58k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer simply have your other PHP file post the required login… May 11, 2026 at 8:37 am
  • added an answer f((int*) 0) or f((char *) 0) But if you find… May 11, 2026 at 8:37 am
  • added an answer It depends on the language, actually. If you're using C++… May 11, 2026 at 8:37 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

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.