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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:30:58+00:00 2026-06-18T09:30:58+00:00

Hi after a previous problem with not having makedepend installed (now solved), I now

  • 0

Hi after a previous problem with not having makedepend installed (now solved), I now have the following error when trying to run my makefile:

$ make
makedepend --  -- -I /usr/include/linux -I include 
cp  executables
cp: missing destination file operand after `executables'
Try `cp --help' for more information.
make: *** [executables] Error 1

and here is my makefile:

CMDLINE_SRC=$(wildcard commandLine/*.c)
CMDLINE_OBJS = $(CMDLINE_SRC:.c=.o)
EXECUTABLES = $(CMDLINE_SRC:.c=)

LIB_SRC=$(wildcard c/*.c)
LIB_OBJ = $(LIB_SRC:.c=.o)
LIB_OUT = lib/libclinrisk.a

INCLUDES = -I include

# compiler
CC = gcc
CCFLAGS = 
LDFLAGS = 

# library paths
LIBS = -Llib -lclinrisk -lm

.SUFFIXES: .c

default: dep executables

executables: $(EXECUTABLES)
    cp $(EXECUTABLES) executables

$(EXECUTABLES): $(LIB_OUT)

.c:
    $(CC) $(INCLUDES) $(LDFLAGS) $< -o $@ $(LIBS)

.c.o:
    $(CC) $(INCLUDES) $(CCFLAGS) -c $< -o $@

$(LIB_OUT): $(LIB_OBJ)
    ar rcs $(LIB_OUT) $(LIB_OBJ)

depend: dep

dep:
    makedepend -- $(CFLAGS) -- -I /usr/include/linux $(INCLUDES) $(LIB_SRC)

clean:
    rm -f $(LIB_OBJ) $(LIB_OUT) Makefile.bak
    rm -f $(CMDLINE_OBJ) $(CMDLINE_PROGS) 
    rm -f executables/*

what is the problem here? I am new to makefiles! will try figure this out in the meantime.

The problem looks like it’s to do with:

cp $(EXECUTABLES) executables

however I’m unaware of a correct pathway to executables…

Thanks.

  • 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-06-18T09:30:59+00:00Added an answer on June 18, 2026 at 9:30 am

    Nothing in your Makefile code sets the EXECUTABLES variable, so it substitutes to an empty string, which calls cp with just a single argument, thus generating the error.

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

Sidebar

Related Questions

I'm having a problem trying to revert a file to a previous commit, I
After some previous help on how to approach a problem I am having with
I am having trouble with modifying a php application to have pagination. My error
I've been having this problem for while now, but always seem to put off
I am having problem with AlertView. I am trying to use the UIAlertView and
I have been having a problem with a Boolean in an if statement all
I'm having a problem getting all the selected files deleted. What I'm trying to
I have one problem and since I am not very skilled with js, I
I am having a problem here that seem to have the better of me.
Please see my previous question: Eclipse is not working after download I deleted the

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.