From: Eric Lilja <mindcooler@gmail.com>
To: cygwin@cygwin.com
Subject: Reliably check if we're running under cygwin inside Makefile
Date: Mon, 12 Jan 2009 12:48:00 -0000 [thread overview]
Message-ID: <gkfcgt$m9j$1@ger.gmane.org> (raw)
Hello, I have a program that will built both under fedora and under
cygwin. The program is written in C and the Makefile is slightly
different between the two systems. Is it possible to check some
environment variable in the makefile to determine what to do?
The source code itself have constructs like these for parts that differ
between cygwin and fedora:
#if defined __CYGWIN__
/* Turn on vsync, this works on Cygwin. */
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
#elif defined __linux
/* Fedora doesn't support SDL_GL_SWAP_CONTROL, but we use this
extension instead. */
SDL_putenv("__GL_SYNC_TO_VBLANK=1");
#endif
and I'm looking for something similiar to use with the Makefiles so I
can turn the two Makefiles into one.
I hope this is considered on-topic, if not, I apologise.
- EL
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
next reply other threads:[~2009-01-12 12:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 12:48 Eric Lilja [this message]
2009-01-12 16:19 ` Greg Chicares
2009-01-12 19:06 Fergus
2009-01-12 20:10 ` Dave Korn
2009-01-12 21:52 ` Grant Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='gkfcgt$m9j$1@ger.gmane.org' \
--to=mindcooler@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).