On Tue Aug 4 04:03:32 2015, sharma...@hotmail.com (Rakesh Sharma) wrote: > One way can be as follows: > > ## pre-define your library directories based on the output of the "getconf" > output format > LIB_32 := /stage2/lib/dbus-1.0/include > LIB_64 := /stage2/lib64/dbus-1.0/include > > # then compute the architecture of the machine running gmake > CFLAGS := -I$(LIB_$(strip $(shell getconf LONG_BIT))) > > ### now you are all set for using the CFLAGS in your build code. > ## you may want to incorporate some amount of error checking > # when the `getconf' command delivers output different than either 32 or 64. > > # another method could be to invoke the "uname -m" command.
How portable is this software supposed to be? uname exists on all the Unixy systems I've used; I'm not sure about getconf, but I notice it exists on Cygwin. -- Reinier Post TU Eindhoven _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make