Makefile executable not generated












0















CC=g++ 
CFLAGS=-c -o
PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp
LIBOBJS=$(patsubst %.cpp, %.o, $(LIBSRCS))
LIBCRAPS=craps
CXXFLAGS=-I./ -fpic
LDFLAGS=-L./

all: $(PROG)

$(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)

%.o: %.cpp
$(CC) $(CXXFLAGS) -c -o $@ $

depend:
${CC} -MM ${PROG}.cpp ${LIBSCRS} > depends.mak

include depends.mak


Why executable file not compiled and generated?



All o files generated with no error.



Why this line $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o does not run ? what is wrong ?










share|improve this question




















  • 1





    Is your actual makefile missing the newline after PROG=craps like you have in your example here?

    – MadScientist
    Nov 23 '18 at 2:35






  • 1





    When asking questions like this it's best to show exactly what command you typed and exactly what output you got. Just saying "does not run" is not sufficiently specific for someone to tell you what's wrong.

    – MadScientist
    Nov 23 '18 at 2:36











  • @MadScientist no it is not missing it is shown on question, the 3rd line, (PROG=craps) just I forgot to add line, just check

    – key.m
    Nov 23 '18 at 19:52











  • @MadScientist no error show nothing, all o file generated correctly axcept this line not executed $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 19:53











  • @MadScientist I have understand your comment well, and I said my mistake not formating the question, I forgot to add new line, means to separate them each in one line

    – key.m
    Nov 23 '18 at 20:23
















0















CC=g++ 
CFLAGS=-c -o
PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp
LIBOBJS=$(patsubst %.cpp, %.o, $(LIBSRCS))
LIBCRAPS=craps
CXXFLAGS=-I./ -fpic
LDFLAGS=-L./

all: $(PROG)

$(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)

%.o: %.cpp
$(CC) $(CXXFLAGS) -c -o $@ $

depend:
${CC} -MM ${PROG}.cpp ${LIBSCRS} > depends.mak

include depends.mak


Why executable file not compiled and generated?



All o files generated with no error.



Why this line $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o does not run ? what is wrong ?










share|improve this question




















  • 1





    Is your actual makefile missing the newline after PROG=craps like you have in your example here?

    – MadScientist
    Nov 23 '18 at 2:35






  • 1





    When asking questions like this it's best to show exactly what command you typed and exactly what output you got. Just saying "does not run" is not sufficiently specific for someone to tell you what's wrong.

    – MadScientist
    Nov 23 '18 at 2:36











  • @MadScientist no it is not missing it is shown on question, the 3rd line, (PROG=craps) just I forgot to add line, just check

    – key.m
    Nov 23 '18 at 19:52











  • @MadScientist no error show nothing, all o file generated correctly axcept this line not executed $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 19:53











  • @MadScientist I have understand your comment well, and I said my mistake not formating the question, I forgot to add new line, means to separate them each in one line

    – key.m
    Nov 23 '18 at 20:23














0












0








0








CC=g++ 
CFLAGS=-c -o
PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp
LIBOBJS=$(patsubst %.cpp, %.o, $(LIBSRCS))
LIBCRAPS=craps
CXXFLAGS=-I./ -fpic
LDFLAGS=-L./

all: $(PROG)

$(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)

%.o: %.cpp
$(CC) $(CXXFLAGS) -c -o $@ $

depend:
${CC} -MM ${PROG}.cpp ${LIBSCRS} > depends.mak

include depends.mak


Why executable file not compiled and generated?



All o files generated with no error.



Why this line $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o does not run ? what is wrong ?










share|improve this question
















CC=g++ 
CFLAGS=-c -o
PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp
LIBOBJS=$(patsubst %.cpp, %.o, $(LIBSRCS))
LIBCRAPS=craps
CXXFLAGS=-I./ -fpic
LDFLAGS=-L./

all: $(PROG)

$(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)

%.o: %.cpp
$(CC) $(CXXFLAGS) -c -o $@ $

depend:
${CC} -MM ${PROG}.cpp ${LIBSCRS} > depends.mak

include depends.mak


Why executable file not compiled and generated?



All o files generated with no error.



Why this line $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o does not run ? what is wrong ?







makefile g++






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 20:35







key.m

















asked Nov 22 '18 at 23:05









key.mkey.m

93




93








  • 1





    Is your actual makefile missing the newline after PROG=craps like you have in your example here?

    – MadScientist
    Nov 23 '18 at 2:35






  • 1





    When asking questions like this it's best to show exactly what command you typed and exactly what output you got. Just saying "does not run" is not sufficiently specific for someone to tell you what's wrong.

    – MadScientist
    Nov 23 '18 at 2:36











  • @MadScientist no it is not missing it is shown on question, the 3rd line, (PROG=craps) just I forgot to add line, just check

    – key.m
    Nov 23 '18 at 19:52











  • @MadScientist no error show nothing, all o file generated correctly axcept this line not executed $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 19:53











  • @MadScientist I have understand your comment well, and I said my mistake not formating the question, I forgot to add new line, means to separate them each in one line

    – key.m
    Nov 23 '18 at 20:23














  • 1





    Is your actual makefile missing the newline after PROG=craps like you have in your example here?

    – MadScientist
    Nov 23 '18 at 2:35






  • 1





    When asking questions like this it's best to show exactly what command you typed and exactly what output you got. Just saying "does not run" is not sufficiently specific for someone to tell you what's wrong.

    – MadScientist
    Nov 23 '18 at 2:36











  • @MadScientist no it is not missing it is shown on question, the 3rd line, (PROG=craps) just I forgot to add line, just check

    – key.m
    Nov 23 '18 at 19:52











  • @MadScientist no error show nothing, all o file generated correctly axcept this line not executed $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 19:53











  • @MadScientist I have understand your comment well, and I said my mistake not formating the question, I forgot to add new line, means to separate them each in one line

    – key.m
    Nov 23 '18 at 20:23








1




1





Is your actual makefile missing the newline after PROG=craps like you have in your example here?

– MadScientist
Nov 23 '18 at 2:35





Is your actual makefile missing the newline after PROG=craps like you have in your example here?

– MadScientist
Nov 23 '18 at 2:35




1




1





When asking questions like this it's best to show exactly what command you typed and exactly what output you got. Just saying "does not run" is not sufficiently specific for someone to tell you what's wrong.

– MadScientist
Nov 23 '18 at 2:36





When asking questions like this it's best to show exactly what command you typed and exactly what output you got. Just saying "does not run" is not sufficiently specific for someone to tell you what's wrong.

– MadScientist
Nov 23 '18 at 2:36













@MadScientist no it is not missing it is shown on question, the 3rd line, (PROG=craps) just I forgot to add line, just check

– key.m
Nov 23 '18 at 19:52





@MadScientist no it is not missing it is shown on question, the 3rd line, (PROG=craps) just I forgot to add line, just check

– key.m
Nov 23 '18 at 19:52













@MadScientist no error show nothing, all o file generated correctly axcept this line not executed $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

– key.m
Nov 23 '18 at 19:53





@MadScientist no error show nothing, all o file generated correctly axcept this line not executed $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

– key.m
Nov 23 '18 at 19:53













@MadScientist I have understand your comment well, and I said my mistake not formating the question, I forgot to add new line, means to separate them each in one line

– key.m
Nov 23 '18 at 20:23





@MadScientist I have understand your comment well, and I said my mistake not formating the question, I forgot to add new line, means to separate them each in one line

– key.m
Nov 23 '18 at 20:23












1 Answer
1






active

oldest

votes


















0














You misunderstood my comment. I'm saying this this:



PROG=craps LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


is wrong. You can't assign two variables on the same line, in a makefile. These variables must look like this:



PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


I'm asking, is the latter how your actual makefile looks, or is the example you provided here just inaccurate.



Also these rules both have incorrect newlines:



 $(PROG): 
$(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS):
$(LIBOBJS) $(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


You are adding the prerequisite lists $(LIBSRCS) and $(LIBOBJS) into the recipe (shell commands) used to build the target. Prerequisites must be on the same line as the target. These should look like this:



 $(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


This is your problem, below



Finally, you can't have both the program and the target have the same name:



PROG=craps
LIBCRAPS=craps


You can only create one target with a given name so the value of both these variables cannot be craps. Maybe you wanted:



PROG = craps
LIBCRAPS = libcraps.so


Assuming the makefile you've quoted here is identical to what you're running, you must be getting warnings like this from make when you run this makefile:



 Makefile:15: warning: overriding recipe for target 'craps'
Makefile:12: warning: ignoring old recipe for target 'craps'


These warnings are why you are not seeing the compile rule invoked: the library rule is overriding it just as the warning says.



Also, you should have the program depend on the library (since it links it) and the object file $(PROG).o because currently make doesn't know it needs to be built. And you don't need to have it depend on all the source files. You want something like:



$(PROG): $(LIBCRAPS) $(PROG).o
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o





share|improve this answer


























  • you are correct, that is what I did in makefile, I did not notice that once I have post the question, The only issue I have is why this line is not executed, all makefiles line executed except this one: $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 20:26











  • I have format the question as exactly my makefile, all o files are generated with no issues, no errors shown, but this line not executed: $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o why?

    – key.m
    Nov 23 '18 at 20:30











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53438915%2fmakefile-executable-not-generated%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You misunderstood my comment. I'm saying this this:



PROG=craps LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


is wrong. You can't assign two variables on the same line, in a makefile. These variables must look like this:



PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


I'm asking, is the latter how your actual makefile looks, or is the example you provided here just inaccurate.



Also these rules both have incorrect newlines:



 $(PROG): 
$(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS):
$(LIBOBJS) $(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


You are adding the prerequisite lists $(LIBSRCS) and $(LIBOBJS) into the recipe (shell commands) used to build the target. Prerequisites must be on the same line as the target. These should look like this:



 $(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


This is your problem, below



Finally, you can't have both the program and the target have the same name:



PROG=craps
LIBCRAPS=craps


You can only create one target with a given name so the value of both these variables cannot be craps. Maybe you wanted:



PROG = craps
LIBCRAPS = libcraps.so


Assuming the makefile you've quoted here is identical to what you're running, you must be getting warnings like this from make when you run this makefile:



 Makefile:15: warning: overriding recipe for target 'craps'
Makefile:12: warning: ignoring old recipe for target 'craps'


These warnings are why you are not seeing the compile rule invoked: the library rule is overriding it just as the warning says.



Also, you should have the program depend on the library (since it links it) and the object file $(PROG).o because currently make doesn't know it needs to be built. And you don't need to have it depend on all the source files. You want something like:



$(PROG): $(LIBCRAPS) $(PROG).o
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o





share|improve this answer


























  • you are correct, that is what I did in makefile, I did not notice that once I have post the question, The only issue I have is why this line is not executed, all makefiles line executed except this one: $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 20:26











  • I have format the question as exactly my makefile, all o files are generated with no issues, no errors shown, but this line not executed: $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o why?

    – key.m
    Nov 23 '18 at 20:30
















0














You misunderstood my comment. I'm saying this this:



PROG=craps LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


is wrong. You can't assign two variables on the same line, in a makefile. These variables must look like this:



PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


I'm asking, is the latter how your actual makefile looks, or is the example you provided here just inaccurate.



Also these rules both have incorrect newlines:



 $(PROG): 
$(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS):
$(LIBOBJS) $(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


You are adding the prerequisite lists $(LIBSRCS) and $(LIBOBJS) into the recipe (shell commands) used to build the target. Prerequisites must be on the same line as the target. These should look like this:



 $(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


This is your problem, below



Finally, you can't have both the program and the target have the same name:



PROG=craps
LIBCRAPS=craps


You can only create one target with a given name so the value of both these variables cannot be craps. Maybe you wanted:



PROG = craps
LIBCRAPS = libcraps.so


Assuming the makefile you've quoted here is identical to what you're running, you must be getting warnings like this from make when you run this makefile:



 Makefile:15: warning: overriding recipe for target 'craps'
Makefile:12: warning: ignoring old recipe for target 'craps'


These warnings are why you are not seeing the compile rule invoked: the library rule is overriding it just as the warning says.



Also, you should have the program depend on the library (since it links it) and the object file $(PROG).o because currently make doesn't know it needs to be built. And you don't need to have it depend on all the source files. You want something like:



$(PROG): $(LIBCRAPS) $(PROG).o
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o





share|improve this answer


























  • you are correct, that is what I did in makefile, I did not notice that once I have post the question, The only issue I have is why this line is not executed, all makefiles line executed except this one: $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 20:26











  • I have format the question as exactly my makefile, all o files are generated with no issues, no errors shown, but this line not executed: $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o why?

    – key.m
    Nov 23 '18 at 20:30














0












0








0







You misunderstood my comment. I'm saying this this:



PROG=craps LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


is wrong. You can't assign two variables on the same line, in a makefile. These variables must look like this:



PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


I'm asking, is the latter how your actual makefile looks, or is the example you provided here just inaccurate.



Also these rules both have incorrect newlines:



 $(PROG): 
$(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS):
$(LIBOBJS) $(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


You are adding the prerequisite lists $(LIBSRCS) and $(LIBOBJS) into the recipe (shell commands) used to build the target. Prerequisites must be on the same line as the target. These should look like this:



 $(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


This is your problem, below



Finally, you can't have both the program and the target have the same name:



PROG=craps
LIBCRAPS=craps


You can only create one target with a given name so the value of both these variables cannot be craps. Maybe you wanted:



PROG = craps
LIBCRAPS = libcraps.so


Assuming the makefile you've quoted here is identical to what you're running, you must be getting warnings like this from make when you run this makefile:



 Makefile:15: warning: overriding recipe for target 'craps'
Makefile:12: warning: ignoring old recipe for target 'craps'


These warnings are why you are not seeing the compile rule invoked: the library rule is overriding it just as the warning says.



Also, you should have the program depend on the library (since it links it) and the object file $(PROG).o because currently make doesn't know it needs to be built. And you don't need to have it depend on all the source files. You want something like:



$(PROG): $(LIBCRAPS) $(PROG).o
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o





share|improve this answer















You misunderstood my comment. I'm saying this this:



PROG=craps LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


is wrong. You can't assign two variables on the same line, in a makefile. These variables must look like this:



PROG=craps
LIBSRCS=craps.cpp craps_game.cpp craps_helper.cpp craps_io.cpp


I'm asking, is the latter how your actual makefile looks, or is the example you provided here just inaccurate.



Also these rules both have incorrect newlines:



 $(PROG): 
$(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS):
$(LIBOBJS) $(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


You are adding the prerequisite lists $(LIBSRCS) and $(LIBOBJS) into the recipe (shell commands) used to build the target. Prerequisites must be on the same line as the target. These should look like this:



 $(PROG): $(LIBSRCS)
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

$(LIBCRAPS): $(LIBOBJS)
$(CC) -shared -o lib$(LIBCRAPS).so $(LIBOBJS)


This is your problem, below



Finally, you can't have both the program and the target have the same name:



PROG=craps
LIBCRAPS=craps


You can only create one target with a given name so the value of both these variables cannot be craps. Maybe you wanted:



PROG = craps
LIBCRAPS = libcraps.so


Assuming the makefile you've quoted here is identical to what you're running, you must be getting warnings like this from make when you run this makefile:



 Makefile:15: warning: overriding recipe for target 'craps'
Makefile:12: warning: ignoring old recipe for target 'craps'


These warnings are why you are not seeing the compile rule invoked: the library rule is overriding it just as the warning says.



Also, you should have the program depend on the library (since it links it) and the object file $(PROG).o because currently make doesn't know it needs to be built. And you don't need to have it depend on all the source files. You want something like:



$(PROG): $(LIBCRAPS) $(PROG).o
$(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 24 '18 at 6:41

























answered Nov 23 '18 at 20:02









MadScientistMadScientist

46.6k55267




46.6k55267













  • you are correct, that is what I did in makefile, I did not notice that once I have post the question, The only issue I have is why this line is not executed, all makefiles line executed except this one: $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 20:26











  • I have format the question as exactly my makefile, all o files are generated with no issues, no errors shown, but this line not executed: $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o why?

    – key.m
    Nov 23 '18 at 20:30



















  • you are correct, that is what I did in makefile, I did not notice that once I have post the question, The only issue I have is why this line is not executed, all makefiles line executed except this one: $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

    – key.m
    Nov 23 '18 at 20:26











  • I have format the question as exactly my makefile, all o files are generated with no issues, no errors shown, but this line not executed: $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o why?

    – key.m
    Nov 23 '18 at 20:30

















you are correct, that is what I did in makefile, I did not notice that once I have post the question, The only issue I have is why this line is not executed, all makefiles line executed except this one: $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

– key.m
Nov 23 '18 at 20:26





you are correct, that is what I did in makefile, I did not notice that once I have post the question, The only issue I have is why this line is not executed, all makefiles line executed except this one: $(PROG): $(LIBSRCS) $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o

– key.m
Nov 23 '18 at 20:26













I have format the question as exactly my makefile, all o files are generated with no issues, no errors shown, but this line not executed: $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o why?

– key.m
Nov 23 '18 at 20:30





I have format the question as exactly my makefile, all o files are generated with no issues, no errors shown, but this line not executed: $(CC) $(LDFLAGS) -l$(PROG) -o $(PROG) $(PROG).o why?

– key.m
Nov 23 '18 at 20:30


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53438915%2fmakefile-executable-not-generated%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin