Fedora Linux Support Community & Resources Center
Old 6th December 2011, 12:55 PM
shamjs Offline
Registered User
Join Date: Dec 2011
Posts: 1
makefile creation

hi all,

im not having much knowledge on makefile.

here is my makefile

APP      = olupxtest
SRCDIR   = olupx/src
SRCS     = $(wildcard $(SRCDIR)/*.cpp)
OBJS     = $(SRCS:.cpp=.o)

CXXFLAGS = -g -fPIC -c
LIBS     = svm.o -lrt -Xlinker -zmuldefs

.PHONY: all clean

all: $(APP)

$(APP): $(OBJS)
        $(CXX) $(LDFLAGS) $^ $(LIBS) -o $@ 2>&1 | less -S

        $(RM) $(OBJS) $(APP)
my .cpp files are in /home/shamjs/source/olupx/src
and my main program is in /home/shamjs/source

1>i need to compile and link one more file svm.cpp ,but its in different directory
its location is /home/shamjs/corenumeric/inc/stat/svmlib

how to adapt these changes in the makefile that i have .......

2>my olupxtest.cpp(main program) is in /home/shamjs/source ,but in makefile itseems that there is no rule to compile olupxtest.cpp ,since im getting error as undefined reference to `main

please guide me ....

waiting for your reply..........
Reply With Quote
Old 7th December 2011, 09:49 PM
Alberth5674764 Offline
Registered User
Join Date: Nov 2011
Posts: 37
Re: makefile creation

Asking someone else to solve your problems is unlikely to give a good impression and/or result in useful answers.
If you want that, hire someone to do your work (but not here, I think).

Otherwise, I'd suggest to learn about Makefiles. Gnu make has very extensive and very readable documentation.
Reply With Quote

creation, makefile

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
% in makefile daviddoria Using Fedora 3 23rd April 2008 01:37 AM
Makefile saicharantej Using Fedora 1 18th April 2008 02:24 PM
Makefile??? bradley Using Fedora 15 23rd January 2008 12:12 PM
Makefile??? disasterpiece12 Hardware & Laptops 1 20th July 2006 08:58 AM
Makefile Elbryan Using Fedora 13 11th January 2006 05:45 PM

Current GMT-time: 13:36 (Friday, 22-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat