X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <415980C6.6080908@inti.gov.ar> Date: Tue, 28 Sep 2004 12:18:30 -0300 From: Salvador Eduardo Tropea User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: es-ar, es, en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Problem with cross-platform app: MAKE vs NMAKE References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i8SFngKM018425 Reply-To: djgpp AT delorie DOT com jansb000 wrote: >I am working on a program that is supposed to be cross-platform. Recently we >have a project member who is using MSVC. The makefile that I made for DJGPP >make is not working for nmake from MSVC. > >I use the variables $@, $< and $^. These seem to be unavailable in MSVC. >Also the IFEQ command is not recognised by nmake. > >What can I do to make my makefile usable to both DJGPP and MSVC? > > You can split your makefile into: 1) Rules. 2) Dependencies. The part (1) will be different for make and nmake and (2) will be shared. Youīll probably need to split (1) to separate the compiler dependent stuff because BC++ also uses nmake syntax. Turbo Vision 2.0.3 (http://sf.net/projects/tvision) does it. It have 3 makefiles (GNU, BC++ and MSVC). The MSVC/BC++ are the same, I just use a wrapper to define a variable. Most UNIX systems does what Eli says, but BC++ and MSVC users arenīt like UNIX users ;-) In *BSD systems you can usually find GNU make renamed as "gmake", the native make isnīt compatible with GNU make. SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: set AT computer DOT org set AT ieee DOT org Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013