Best way to compile programs

Discussion in 'Computer Programming, Emulation, and Game Modding' started by Polarise, Dec 22, 2016.

  1. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    Hello, when I go to github and see the projects, I see that there are different file formats that they use to compile them.

    Example:
    [CMAKE]
    [MAKEFILE].

    Is there even a program where I could just click on that make file and it compiles? That would be great because I don't like using command lines.
     
  2. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
    You type "make", is it that hard?
    For the really lazy, you could always include this shell script in the same folder as the Makefile, then you can just double-click. If you're on Linux or Mac, you might need to change it from make.bat to make.sh (or just make).

    PS: Worst compression ratio ever.
     

    Attached Files:

    • make.zip
      File size:
      118 bytes
      Views:
      29
  3. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    So I go to the file location of where the source is, I go to file, open in command window, then type make? Does it even matter if it is named cmake or makefile?

    Btw I am on Windows.
     
  4. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
    If there's a file named CMakefile, type cmake, then make.
    Otherwise, if there's a file named Makefile, type make
     
  5. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    What are the differences between the two and other names?
     
  6. 0x40

    0x40 GBAtemp Regular

    Member
    234
    65
    Apr 20, 2013
    CMake does things like check for dependencies and figures out what libraries to use, and lets you configure things like the install prefix. It's similar to running a ./confiigure script, which some projects require you to do before running make. There's also aimake and qmake, and probably a whole bunch of other build systems.
     
  7. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    What do I even need to compile the programs? What program?
     
  8. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
    make
    Or cmake
    When using the command line, the name of the command is also the name of the program.
     
  9. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    when I type make or cmake in the command line it says an error. Is there a program that needs to be installed?
     
  10. Seriel

    Seriel Worshipper of Skiddos

    Member
    2,772
    5,530
    Aug 18, 2015
    United Kingdom
    /home/erisa/
    What are you trying to compile.
     
  11. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    I just want to know how to compile things. I am trying to compile WUPInstaller.
     
  12. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
    What's the error?
     
  13. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    something like

    Code:
    'make' is not recognized as an internal or external command,
    operable program or batch file
    
     
  14. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
    Install make
     
  15. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    can you link me to the program? It also says the same thing with cmake
     
  16. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
  17. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    So I installed it successfully and now it says this when I type make on the command line:

    Code:
    C:\Users\*****\OneDrive\Documents\Wii U Backup\wiiu\apps\wupinstaller-master>make
    make[1]: /c/Users/*****/OneDrive/Documents/Wii: No such file or directory
    make[1]: *** No rule to make target `/c/Users/******/OneDrive/Documents/Wii'.  Stop.
    make: *** [build] Error 2
    
     
  18. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
    Run it from a folder without spaces in the name
     
  19. Polarise
    OP

    Polarise GBAtemp Advanced Fan

    Member
    796
    98
    Jul 12, 2016
    United States
    So I put the files on my desktop in a folder named compile. Now I came across this:

    Code:
    make[1]: *** No rule to make target `c:/Users/tarik/Downloads/wupinstaller-master/wupinstaller-master/src/entry.c', needed by `entry.o'.  Stop.
    make: *** [build] Error 2
    
     
  20. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,594
    583
    Mar 26, 2015
    United States
    That's odd, is the file there?