Question for compiler gurus.

Discussion in 'Computers, Hardware, and Operating Systems' started by AA7EJ, Sep 12, 2017.

ad: L-HROutlet
ad: l-rl
ad: Subscribe
ad: L-MFJ
ad: l-assoc
  1. K6CLS

    K6CLS Ham Member QRZ Page

    on my rpi3, uname -m is "armv7l" so this ifeq doesn't match and CPP_FLAGS is left empty.

    just fyi
    K1ABX likes this.
  2. K1ABX

    K1ABX Ham Member QRZ Page

    That's intentional. AA7EJ had another thread where I pointed his attention to a snipped of code for make that handled that very issue.
  3. AA7EJ

    AA7EJ Ham Member QRZ Page

    You are correct.
    I just keep avoiding learning "make" and was hoping autotools would postpone the inevitable.
    Not so - this autotools is an incredible mess of stuff and time consuming effort to make it all work.
    And I have not introduced TCF and the "target" platform.
    Of course it is no longer referred to as "target", obviously.

    So - today I'll rake a break from coding and go earn Houston's major some FEMA money by shoveling s..t out of peoples houses. Luckily the RF / TV does not transmit smell!

    73 Shirley
  4. AA7EJ

    AA7EJ Ham Member QRZ Page

    I is back and ready with another stupid inquiry.
    As stated in my previous post , I have been avoiding "make".
    After my decision to give autotools a spin I have no choice but to dive in.

    I can RTFM until cows come home, but sometime just cannot connect the dots.

    I can get the connection between autoools as GNU "system" , but...

    Normal steps in Eclipse IDE is to "create" "New ( project) " , than "Build project".
    I know the "New" actually (automatically !) builds "makefile", I can see that in the file text -
    "Automatically-generated file. Do not edit!"

    So the stupid question #1 is - what do you call "make" itself?
    It has rules. syntax etc but it does not build anything - makefile does.

    Not only that - autotools have and apparently "created" by yet another layer - "configure" file.

    More RTFM , mainly to find out when and how Eclipse interacts with this mysterious "configure" member of family of tools who work together but it is not too apparent how.

    #2 Since I have discovered "-v" (verbose) to be very helpful analyzing compiler works I like to put it back into "autotools". So far no luck.

    So far the only tangible result of autotool is that I can execute system("lsusb -v") without including any additional header file. I use it as "printf" on steroids to further verify which platform is actually being executed.

    73 Shirley
  5. AA7EJ

    AA7EJ Ham Member QRZ Page

    "More RTFM , mainly to find out when and how Eclipse interacts with this mysterious "configure" member of family of tools who work together but it is not too apparent how."

    "Prior to running a build, the Autotools plug-in runs the configure script."

    There, direct quote after RTFM. What can be simpler?

    How it gets there is still a mystery.
    Perhaps hidden in Eclipse "Open source" code somewhere.

  6. KA8NCR

    KA8NCR Ham Member QRZ Page


    You keep avoiding using the tools that developers use at your own peril. There are no new shortcuts to be gained here, just learn how to use 'make' so you can realistically manage your source compilation rules and actually save time rather than trying to do this by hand. Repetitive tasks are WHAT COMPUTERS EXCEL AT DOING, why are you not allowing the very tool at your disposal to do all the work for you?

    I know, you don't want someone to present you the uncomfortable facts that you're doing it wrong, or your way isn't the right way, or you need to actually RTFM in order to make this work. Sorry Shirley, but what you are expecting here is easy access to knowledge others have taken the time to master when ample help is available to those with a modicum of initiative.

    Your projects are cool as hell. But I'm reluctant to participate in the Q/A here because you've made it completely clear that you want the question du jour answered without any other comments. Not one part of the overall goal of your project comes without collateral learning. I have a great amount of respect for OMs who take on these kinds of projects, but you need to take it from someone who expended a great amount of effort in his adult life career retooling in that, you just need to learn how to use the basic tools of development. Your attempts at shortcuts are short circuiting your progress.

    'make' is a thing because managing the compilation of projects by hand is an error-prone pain in the ass. Take 2 hours to learn how to create a make file for your project. Please, for the children?
    KD4MOJ, K1ABX, WN6U and 1 other person like this.
  7. KA9JLM

    KA9JLM Ham Member QRZ Page

    And Tux

  8. K1ABX

    K1ABX Ham Member QRZ Page

    I agree with some posters above - you come across like a bad intern who doesn't know anything, but doesn't listen when others try to steer them in the right direction.
    Here is the simple example of how you are setting up yourself to fail :


    make - GNU make utility to maintain groups of programs

    make [ -f makefile ] [ options ] ... [ targets ] ...

    This man page is an extract of the documentation of GNU make. It is updated only occasionally, because the GNU project does not use nroff. For complete, current documentation, refer to the Info file which is made from the Texinfo source file

    The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them. The manual describes the GNU implementation of make, which was written by Richard Stallman and
    Roland McGrath, and is currently maintained by Paul Smith. Our examples show C programs, since they are most common, but you can use make with any programming language whose compiler can be run with a shell command. In fact, make is not limited to programs.
    You can use it to describe any task where some files must be updated automatically from others whenever the others change.

    To prepare to use make, you must write a file called the makefile that describes the relationships among files in your program, and the states the commands for updating each file. In a program, typically the executable file is updated from object files, which
    are in turn made by compiling source files.

    Once a suitable makefile exists, each time you change some source files, this simple shell command:


    suffices to perform all necessary recompilations. The make program uses the makefile data base and the last-modification times of the files to decide which of the files need to be updated. For each of those files, it issues the commands recorded in the data

    make executes commands in the makefile to update one or more target names, where name is typically a program. If no -f option is present, make will look for the makefiles GNUmakefile, makefile, and Makefile, in that order.

    Normally you should call your makefile either makefile or Makefile. (We recommend Makefile because it appears prominently near the beginning of a directory listing, right near other important files such as README.) The first name checked, GNUmakefile, is not
    recommended for most makefiles. You should use this name if you have a makefile that is specific to GNU make, and will not be understood by other versions of make. If makefile is `-', the standard input is read.

    make updates a target if it depends on prerequisite files that have been modified since the target was last modified, or if the target does not exist.
  9. AA7EJ

    AA7EJ Ham Member QRZ Page

    I really do not want to impose on anybody here and I do appreciate all the support so far and consider this case closed.
    There will be no new ones coming.
  10. KA9JLM

    KA9JLM Ham Member QRZ Page

    Why ?

    Promise ?

Share This Page