Article View: comp.unix.programmer
Article #3746Generic and platform-specific Makefiles
From: Alex Vinokur
Date: Thu, 21 Aug 2003 11:32
Date: Thu, 21 Aug 2003 11:32
34 lines
1857 bytes
1857 bytes
Hi,
I would like to create Makefile which suits different platforms and operating systems.
#########################
# GNU Make version 3.79.1
#########################
For instance, I have some program.
If I compile the program on Cygwin (Windows 2000)
the Makefile must contain the following line :
-------------------------
LIBS = -lwsock32
-------------------------
If I compile the program on Linux
the Makefile must not contain that line.
What ways should be used to create such a Makefile? :
* generic Makefile for all platforms?
* main Makefile including platform-specific definitions?
* something else?
What techniques exist to do that?
Thanks,
=====================================
Alex Vinokur
mailto:alexvn@connect.to
http://mathforum.org/library/view/10978.html
=====================================
Technical Details
Message-ID:
<bi2ar0$4h8si$1@ID-79865.news.uni-berlin.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!212.150.34.190!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109f73,1b57b03510500b7e,start X-Google-Attributes: gid109f73,public X-Google-Thread: fc89c,1b57b03510500b7e,start X-Google-Attributes: gidfc89c,public X-Google-ArrivalTime: 2003-08-21 04:36:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!212.150.34.190!not-for-mail From: "Alex Vinokur" <alexvn@bigfoot.com> Newsgroups: comp.unix.programmer,gnu.utils.help Subject: Generic and platform-specific Makefiles Date: Thu, 21 Aug 2003 14:32:42 +0300 Lines: 38 Message-ID: <bi2ar0$4h8si$1@ID-79865.news.uni-berlin.de> Reply-To: "Alex Vinokur" <alexvn@connect.to> NNTP-Posting-Host: 212.150.34.190 X-Trace: news.uni-berlin.de 1061465762 4760466 212.150.34.190 (16 [79865]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106