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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:03:19+00:00 2026-05-30T22:03:19+00:00

I have the following Makefile: OBJDIRS = Runtime/Core/Common Runtime/Core/Graphic/SymbolXLib Runtime/Core/Map Runtime/Core/SymbolDictionary \ Runtime/CoreClient/RuntimeCoreJava OBJS

  • 0

I have the following Makefile:

OBJDIRS       = Runtime/Core/Common Runtime/Core/Graphic/SymbolXLib Runtime/Core/Map Runtime/Core/SymbolDictionary \
                Runtime/CoreClient/RuntimeCoreJava
OBJS          = $(wildcard $(OBJDIRS:=/*.o))
TARGETA       = libRuntimeCoreJava.a
TARGETD       = libRuntimeCoreJava.so
TARGETD1      = $(TARGETD).1
TARGETD2      = $(TARGETD).1.0
TARGETD3      = $(TARGETD).1.0.0
AR            = ar cqs
LINK          = g++
SYMLINK       = ln -f -s
LDFLAGS = -shared -Wl,-soname,libRuntimeCoreJava.so.1

all : $(TARGETD) $(TARGETA)

$(TARGETD) : $(OBJS)
        echo "Building Dynamic Lib using "$(OBJS)
        #$(CXX) $(LDFLAGS) $(OBJS)
        #$(SYMLINK) $(TARGETD) $(TARGETD1)
        #$(SYMLINK) $(TARGETD) $(TARGETD2)
        #$(SYMLINK) $(TARGETD) $(TARGETD3)

$(TARGETA) : $(OBJS)
        echo "Building Static Lib using "$(OBJS)
        #$(AR) $(TARGETA) $(OBJS)

When I run make at the same level as the Makefile it appears to call another makefile unrelated to this one.

In file included from Runtime/Core/Common/JNICallback.cpp:16:
Runtime/Core/Common/stdafx.h:33:17: error: log.h: No such file or directory
Runtime/Core/Common/stdafx.h:34:23: error: Namespace.h: No such file or directory
Runtime/Core/Common/JNICallback.cpp:18:25: error: JNICallback.h: No such file or directory
make: *** [Runtime/Core/Common/JNICallback.o] Error 1

As you can see I am not even building any source, only taking object files that are already compiled and putting them into a static and dynamic library. Why is it trying to compile source? Below is my directory structure.

[matt6809@hogganz400 src]$ ls -l
drwxrwxr-x  2 matt6809 matt6809  4096 Mar  2 11:47 binDebug
drwxrwxr-x  2 matt6809 matt6809  4096 Feb 15 13:31 binRelease
drwxrwxr-x  2 matt6809 matt6809  4096 Feb 22 11:03 include
drwxrwxr-x  2 matt6809 matt6809  4096 Mar  5 10:55 libDebug
drwxrwxr-x  2 matt6809 matt6809  4096 Feb 15 11:25 libRelease
-rw-rw-r--  1 matt6809 matt6809   824 Mar  6 15:48 Makefile
drwxrwxr-x  5 matt6809 matt6809  4096 Feb 14 16:03 Runtime
drwxrwxr-x  6 matt6809 matt6809  4096 Feb 14 16:43 System

I am 100% sure I am in the same directory as the makefile. What gives?

  • 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-30T22:03:20+00:00Added an answer on May 30, 2026 at 10:03 pm

    Your targets have object files as prerequisites (whatever object files happen to be in those directories at the time). The object files already exist, but Make will check them to see if they’re out of date and should be rebuilt. If it checks an object file, finds a corresponding source file that’s newer, tries to recompile the object and there’s a header file missing, you’ll get an error message like what you see. There is no evidence of another makefile in play.

    There are a couple of ways to deal with it. The easiest way is probably to move the source files away from the directory where you run Make (or vise-versa).

    EDIT:
    @eriktous has pointed out a better way: use make -r to disable the built-in rules.

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

Sidebar

Related Questions

I have the following directory structure: . .. ./Graphic/ ./Graphic/SymbolXLib There are several other
I have the following makefile for my project, and I'd like to configure it
I have the following PHONY target in Makefile install: echo /usr/bin/shelldecrypt must be writable
In a makefile, I have the following line: helper.cpp: dtds.h Which ensures that helper.cpp
I'm using GNU Make 3.81, and I have the following rule in my Makefile:
I have a makefile with something like the following targets: install: do a whole
I have used -Wall -Werror in my Makefile but I want to disable following
I have the following Makefile rules: DIR = src SOURCES = $(shell find $(DIR)
gcc 4.4.4 I have the following Makefile OBJECT_FILES = brd.o logger.o test_brd.o CFLAGS =
I have the following block of code in a makefile: param_test_dir: @if test -d

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.