#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12

    Win32 equivilent to "build"?


    Hey, I'm looking at a few apps done for linux etc., and they say "go to the directory and execute build". Now 'build' is the makefile, I understand that, but how do I execute that make file through like MS DOS Prompt?

    I'm using Borland C++ 5.02, and the only thing I can find is "make", but make can't "find" the build file. :rolleyes:

    Any ideas how to execute build? Or any other compilers I should try (other than VC++ as that's sort of expensive, for what I'm doing.).

    Thanks for your help!

    Regards,
    Someonewhois
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12
    Oh, and I just installed Dev-C++, if that has a make file builder. thanks!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12
    Never mind, unless somebody knows how, I'm just downloading Linux :p
  6. #4
  7. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,163
    Rep Power
    2222
    I hope that you are going to load Linux on another machine. Talk about starting over from scratch. Well, if nothing else, welcome to Linux! I'm straddling both worlds myself.

    OK, to answer your basic question:
    Yes, you are going to do a make. The name of the make utility is usually "make", though the Microsoft version is usually "nmake". I'm not sure whether Borland had given it a different name or not.

    Normal UNIX procedure is to name the make file "Makefile" (capitalization is important, especially in UNIX/Linux). Then just type the command:
    make
    and it will use the file Makefile.

    Or you can name the makefile something different, like myproj.mak, in which case you need to tell make what that name is through the -f option:
    make -f myproj.mak

    In addition, if the makefile has more than one target, then you can name the target at the command line. For example, many Linux makefiles have an install target that will create the other target files, copy them to the directories specified in the makefile, and do whatever other setup is needed -- kind of like the old INSTALL.BAT files in DOS, only much more powerful. For that target in the myproj.mak file, you would enter the command:
    make -f myproj.mak install

    Hope that helps you get started.
  8. #5
  9. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,110
    Rep Power
    1803
    If you use the project facility in Dev-C++ it generates a makefile called makefile.win.

    You need not run it from the command line since you can do it from the IDE, but if you need to:

    make -fmakefile.win

    Although I fail to understand why you are asking the question before you have even tried the software. Dev-C++ is an IDE that uses the MinGW implementation of the gcc compiler (the same compiler you'd use on Linux). All the same command line tools that you'd expect in the Linux compiler toolchain are provided.

    You can get specifc help on Dev-C++ at https://sourceforge.net/forum/forum.php?forum_id=48211

    Clifford
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12
    Well I tried it, but couldn't find my way around that well because I'm used to borland's IDE. Sorry, and thanks for your responses, that's all I need. :)

    Regards,
    Someonewhois
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12
    Argh, it doesn't like me..

    The make files don't work at all, they're all incompatible, but I'm trying to use the project mode in Dev-CPP, and it's not working too great.

    #!/bin/sh

    set -e
    set -x

    MEMPHIS=../../memphis/memphis
    MRTS=../../mrts/mrts.o
    LEX=flex
    YACC="bison -y"
    LEX=lex
    YACC=yacc
    CPLUSPLUS=gcc

    $LEX tokens.l

    $YACC -d grammar.y

    $MEMPHIS -h ast.m

    $MEMPHIS ast.m
    $MEMPHIS inter.m

    $CPLUSPLUS -o interpret \
    lex.yy.c \
    y.tab.c \
    main.c \
    err.c \
    ast.cpp \
    inter.cpp \
    $MRTS

    interpret < tst
    Now how on earth do I make that into a dev (project) file in Dev-CPP?!

    Thanks for your help.

    Regards,
    Someonewhois
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12
    Anybody? This is really starting to piss me off... what should the project list include and what kind of flags should be called?

    Thanks.

    Regards,
    Someonewhois
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    54
    Rep Power
    12
    Your problem seems to be that that is not a makefile at all - it's a Bash shell script.

    It'd probably be easier for you to just change that into a DOS batch file. Just make a .bat file and do the subsitutions yourself.

    Something like:


    flex lex.l
    bison -y -d grammar.y
    ../../memphis/memphis -h ast.m
    ../../memphis/memphis ast.m
    ../../memphis/memphis inter.m
    gcc -o interpret lex.yy.c y.tab.c main.c err.c ast.cpp inter.cpp ../../mrts/mrts.o
    interpret < tst
    Of course, you'll need to have flex and bison as well as the Mephis compiler tools.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12
    Thanks, I'll do that from now on. :)

    Regards,
    Someonewhois

IMN logo majestic logo threadwatch logo seochat tools logo