Author Topic: first use of make  (Read 8984 times)

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
first use of make
« on: June 02, 2007, 07:06:25 pm »
I try to work on a project called mahogany. For that I have build "imap" first. I try this, too.

For that I use a custom makefile.
Code
# ========================================================================
# Copyright 1988-2006 University of Washington
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
#
# ========================================================================

# Program: IMAP Toolkit Makefile for Windows 9x and Windows NT
#
# Author: Mark Crispin
# Networks and Distributed Computing
# Computing & Communications
# University of Washington
# Administration Building, AG-44
# Seattle, WA  98195
# Internet: MRC@CAC.Washington.EDU
#
# Date: 7 December 1989
# Last Edited: 30 August 2006


COPY=copy
CD=cd
MAKE=nmake /nologo /f makefile.nt
MKDIR=mkdir
RD=rmdir /s /q


# Make the IMAP Toolkit

build: c-client mtest mailutil imapd ipopd
$(CD) c-client
$(MAKE)
$(CD) ..\mtest
$(MAKE)
$(CD) ..\mailutil
$(MAKE)
$(CD) ..\ipopd
$(MAKE)
$(CD) ..\imapd
$(MAKE)
$(CD) ..

c-client:
$(MKDIR) c-client
$(COPY) src\c-client\*.* c-client
$(COPY) src\charset\*.* c-client
$(COPY) src\osdep\nt\*.* c-client

mtest:
$(MKDIR) mtest
$(COPY) src\mtest\*.* mtest

mailutil:
$(MKDIR) mailutil
$(COPY) src\mailutil\*.* mailutil

ipopd:
$(MKDIR) ipopd
$(COPY) src\ipopd\*.* ipopd

imapd:
$(MKDIR) imapd
$(COPY) src\imapd\*.* imapd

clean:
$(RD) c-client mtest mailutil ipopd imapd

# A monument to a hack of long ago and far away...
love:
@echo 'not war?'

Something is done and the build-log close as you can see here.

Code
cd c-client
nmake /nologo /f makefile.nt
cd c-client
nmake /nologo /f makefile.nt
cl -c /MT /W3 /Ox /DCHUNKSIZE=65536 /DWIN32 /D_WIN32_WINNT=0x0400 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -nologo /I..  os_nt.c
os_nt.c
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 's'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2061: Syntaxfehler : Bezeichner 's'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(73) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2061: Syntaxfehler : Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(96) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2061: Syntaxfehler : Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(109) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2061: Syntaxfehler : Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(138) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2061: Syntaxfehler : Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(154) : error C2059: Syntaxfehler : ')'
ssl_nt.c(31) : fatal error C1083: Include-Datei kann nicht geoeffnet werden: 'schannel.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : Rueckgabe-Code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio\VC98\bin\nmake.exe"' : Rueckgabe-Code '0x2'
Stop.
make.exe: *** [build] Error 2
Process terminated with status 2 (0 minutes, 2 seconds)
0 errors, 0 warnings

In the build-settings I can see the make-command that Code::Blocks use. But if I insert "make" in my WinXP-shell it is an unknown command. Does C::B use the MinGW make automaticly? Ok, but what is about this VC98 thing in the build log. I have MSVC6-IDE on my system, but I do not want to use it.
The result of this build are some o-files but no lib-file is created.

It is the first time I use a makefile.

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: first use of make
« Reply #1 on: June 02, 2007, 07:48:48 pm »
Quote
(..) In the build-settings I can see the make-command that Code::Blocks use (..) I have MSVC6-IDE on my system, but I do not want to use it

I suppose that this "make" command you have commented is only the variable used by C::B referring the make command defined in Settings -> Compiler and debugger -> Global compiler settings -> Toolchain executables.

But, if you have MSVC6 installed in your system, then it's tools will be probably included in your path. The makefile you are trying to use is calling to nmake, and your system is finding nmake inside that path: C:\Programme\Microsoft Visual Studio\VC98\bin\nmake.exe.

So, I think that you have only a configuration problem. BTW, what compiler are you trying to use?
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: first use of make
« Reply #2 on: June 02, 2007, 08:03:15 pm »
I suppose that this "make" command you have commented is only the variable used by C::B referring the make command defined in Settings -> Compiler and debugger -> Global compiler settings -> Toolchain executables.

Ok, I just find make.exe (I think it is in CodeBlocks/bin) in this settings. I found nothing about MSVC there or in other compiler settings or search-dirs, etc.

But, if you have MSVC6 installed in your system, then it's tools will be probably included in your path. The makefile you are trying to use is calling to nmake, and your system is finding nmake inside that path: C:\Programme\Microsoft Visual Studio\VC98\bin\nmake.exe.

Ok, I uninstalled my MSVC. Now the shell didn't find any nmake. In CodeBlocks/bin is no nmake.exe.

So, I think that you have only a configuration problem. BTW, what compiler are you trying to use?

C::B is setup to GNU GCC. So it is the MinGW compiler suite in CodeBlocks/bin.

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: first use of make
« Reply #3 on: June 02, 2007, 08:11:42 pm »
Quote from: MoonKid
(..) C::B is setup to GNU GCC. So it is the MinGW compiler suite in CodeBlocks/bin (..)

I'm a little confused here. C::B doesn't include any compiler itself, I think that has defined a GCC option by default, tough. In any case, you need to install one of the supported compilers for build your programs with Code::Blocks.
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: first use of make
« Reply #4 on: June 02, 2007, 08:36:23 pm »
In any case, you need to install one of the supported compilers for build your programs with Code::Blocks.

The mingw32-g++.exe, make.exe, etc files are all in CodeBlocks/bin. I do not know why they are there. Maybe MinGW install it there automaticly if it finds C::B. Or C::B copied it automaticly there if it findes MinGW on the system.
I didn't know that.

But it work.

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: first use of make
« Reply #5 on: June 02, 2007, 09:15:45 pm »
Well. I suspect that you're using the old C::B RC2 version bundled with MinGW (i've been always using nightlies and svn builds).
And the makefile you're trying to use was intended for MS nmake, so it won't work with your current environmenr.
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: first use of make
« Reply #6 on: June 02, 2007, 10:49:48 pm »
Well. I suspect that you're using the old C::B RC2 version bundled with MinGW (i've been always using nightlies and svn builds).

Of course I installed RC2 and then extracted nigthlies over it. I am using the nightlies!

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: first use of make
« Reply #7 on: June 02, 2007, 11:03:42 pm »
And the makefile you're trying to use was intended for MS nmake, so it won't work with your current environmenr.

Ok, I just changed the line
Code
MAKE=nmake /nologo /f makefile.nt
to
Code
MAKE=make /nologo /f makefile.nt

Now the errors are this
Code
cd c-client
make /nologo /f makefile.nt
make[1]: *** No rule to make target `/nologo'.  Stop.
make[1]: Entering directory `D:/Garage/projekte/mahogany/mahoganySVN/lib/imap'
make.exe: *** [build] Error 2
make[1]: Leaving directory `D:/Garage/projekte/mahogany/mahoganySVN/lib/imap'
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

The target should be "build" I think and C::B does give "build" as a parameter to make because the current build-target in the project is "build".

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: first use of make
« Reply #8 on: June 02, 2007, 11:54:23 pm »
The makefile itself was designed for MSVC's nmake, not GCC's make. The two have different syntax and are not inter-compatible. Read the documentation to see if you can find instructions for building with MinGW/GCC; what you're currently trying is for MSVC.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Online stahta01

  • Lives here!
  • ****
  • Posts: 7665
    • My Best Post
Re: first use of make
« Reply #9 on: June 03, 2007, 01:50:16 am »
The makefile itself was designed for MSVC's nmake, not GCC's make. The two have different syntax and are not inter-compatible. Read the documentation to see if you can find instructions for building with MinGW/GCC; what you're currently trying is for MSVC.

FYI: The docs are old, 2004, and they say MSVC or Cygwin GCC 2.95. It says minGW GCC is not supported. The last time I tried it I gave up, but I got close to getting it to compile, most likely it would not have worked since was was just removing the areas that was not working out.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: first use of make
« Reply #10 on: June 03, 2007, 10:38:25 am »
What does developers think If they create a open source project but support it with properitaer build-system?

Is there a open and free way to build "imap" on a windows system?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7665
    • My Best Post
Re: first use of make
« Reply #11 on: June 04, 2007, 12:56:15 pm »
What does developers think If they create a open source project but support it with properitaer build-system?

Is there a open and free way to build "imap" on a windows system?

I am trying to build mahogany using Code::Blocks and MinGW GCC. Do you want the info when I am done? Or when I give up on trying to do it this time?

See this thread if you want to know more
Mahogany Code::Blocks project files using minGW GCC
http://forums.codeblocks.org/index.php/topic,6081.msg46535.html#msg46535

Tim S
« Last Edit: June 05, 2007, 06:42:24 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org