paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [6415] use -fPIC flag to compile C code when 64 bit


From: Eric
Subject: [paparazzi-commits] [6415] use -fPIC flag to compile C code when 64 bit OS
Date: Fri, 19 Nov 2010 05:37:37 +0000

Revision: 6415
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6415
Author:   lamestllama
Date:     2010-11-19 05:37:36 +0000 (Fri, 19 Nov 2010)
Log Message:
-----------
use -fPIC flag to compile C code when 64 bit OS

Modified Paths:
--------------
    paparazzi-software/trunk/sw/lib/ocaml/Makefile

Modified: paparazzi-software/trunk/sw/lib/ocaml/Makefile
===================================================================
--- paparazzi-software/trunk/sw/lib/ocaml/Makefile      2010-11-18 23:01:25 UTC 
(rev 6414)
+++ paparazzi-software/trunk/sw/lib/ocaml/Makefile      2010-11-19 05:37:36 UTC 
(rev 6415)
@@ -23,8 +23,15 @@
 
 Q=@
 
-INCLUDES= -I +xml-light -I +pcre -I +netstring
-XINCLUDES= -I +lablgl -I +lablgtk2 -I +xml-light
+LBITS := $(shell getconf LONG_BIT)
+ifeq ($(LBITS),64)
+  FPIC = -ccopt -fPIC   
+else
+  FPIC =
+endif
+
+INCLUDES=  $(shell ocamlfind query -r -i-format xml-light)  $(shell ocamlfind 
query -r -i-format netstring) $(shell ocamlfind query -r -i-format pcre)
+XINCLUDES= -I +lablgl $(shell ocamlfind query -r -i-format lablgtk2) $(shell 
ocamlfind query -r -i-format xml-light)
 OCAMLC=ocamlc
 OCAMLOPT=ocamlopt
 OCAMLLEX=ocamllex
@@ -78,7 +85,7 @@
 
 %.o   : %.c
        @echo OC $<
-       $(Q)$(OCAMLC) $(INCLUDES) -c $<
+       $(Q)$(OCAMLC) $(FPIC) $(INCLUDES) -c $<
 
 ml_gtk_drag.o : ml_gtk_drag.c
        @echo OC $<




reply via email to

[Prev in Thread] Current Thread [Next in Thread]