c++ - makefile: how to perform “ranlib” operation correctly -


I have downloaded a third party GB () which installs and compiles properly. This creates multiple object files (* .o), instead of executable , it does the gnu to some scripting using libtool. I am planning to make some changes in some functions; However, given that I'm new to Linux, I thought to avoid libtool and make executable just to be

I wrote a small makefile to create many object files and libraries links and an execution . All object files already exist as a library archive file ( libtaucs.a ). Based on the online retailer, I came to know that I have to show the "Ranul" utility as mentioned here, however, I get the following error:

  $ make make: *** There is no rule to make the goal 'ranlib', which is required by 'test_me_DKU' to stop.  

Here's my makefile which I'm already using to add to the existing object file (Disclaimer: I hardly understand makefile, therefore, you can get lots of error a)

  # this is a simple macro LINK_TARGET = test_me_DKU # it make macro that uses the backslash to expand to multiple rows ## OBJS = tsnnls_test.o OBJS = libtsnnls_la-taucs_malloc it.Oh Libtsnanls_l-Toks_kks_arderko \ Libtsnanls_l-Toks_kks_opsko Libtsnanls_l-Toks_vek_besko \ Libtsnanls_l-Toks_kampleksko Libtsnanls_l-Kolndko \ L Ibtsnnls_l-Aandbrko Libtsnanls_l-Amdeksa it.Oh \ Libtsnanls_l-Amdatriko Libtsnanls_l-Jnmndko \ Libtsnanls_l-Toks_taimrko Libtsnanls_l-Toks_sn_lltko \ Libtsnanls_l-Toks_kks_besko Libtsnanls_l-Tlskrko \ Libtsnanls_l-Tsnnlsko Libtsnanls_l -lsqr.o \ tsnnls_test.o # has introduced two macro is make macro defined by Akspansiyns I # macro expansion can be regarded as a text replacement macro Mac with $ the # macro expansion) in parentheses ( is attached. REBUILDABLES = $ (OBJS) $ (LINK_TARGET) clean: rm -f $ (REBUILDABLES) Clean all echo: $ (LINK_TARGET) RANLIB all echo = ranlib LIBTARGET = / usr / local / lib / taucs_full / lib / linux / libtaucs .a tsnnls_test_LDADD = $ (LDADAD) LIBS = -Laggetable 2 -PackPAC -LLAS -LandMath $? , # $ @ Expanded in this case "test_me.exe" for the target of the $ @ $ (RANLIB) $ (LIBTARGET) -lm # Here a rule uses something created in the macro to create your order. # $ ^ In this case, defined OBJS extended multiple files to dependency rule # * (o) $ (LINK_TARGET): $ (OBJS) $ (tsnnls_test_LDADD) $ (LIBS) g ++ g -o $ @ $ ^  

Also, can anyone explain this order?

itemprop = "text"

  g ++ -g -o $ @ $ ^  

Comments