paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [6420] Use fPIC for 64 bit and ocamlfind to find oca


From: Eric
Subject: [paparazzi-commits] [6420] Use fPIC for 64 bit and ocamlfind to find ocaml libs
Date: Fri, 19 Nov 2010 07:33:32 +0000

Revision: 6420
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6420
Author:   lamestllama
Date:     2010-11-19 07:33:31 +0000 (Fri, 19 Nov 2010)
Log Message:
-----------
Use fPIC for 64 bit and ocamlfind to find ocaml libs

Modified Paths:
--------------
    paparazzi-software/trunk/sw/ground_segment/cockpit/Makefile

Modified: paparazzi-software/trunk/sw/ground_segment/cockpit/Makefile
===================================================================
--- paparazzi-software/trunk/sw/ground_segment/cockpit/Makefile 2010-11-19 
06:38:15 UTC (rev 6419)
+++ paparazzi-software/trunk/sw/ground_segment/cockpit/Makefile 2010-11-19 
07:33:31 UTC (rev 6420)
@@ -23,14 +23,22 @@
 # Quiet compilation
 Q=@
 
+LBITS := $(shell getconf LONG_BIT)
+ifeq ($(LBITS),64)
+   FPIC=-fPIC
+   OCAMLCFLAGS=-thread -ccopt -fPIC
+else
+   FPIC=
+   OCAMLCFLAGS=-thread
+endif
+FPIC=-fPIC
+
 OCAMLC=ocamlc
-
-OCAMLCFLAGS=-thread
 OCAMLOPT=ocamlopt
 OCAMLOPTFLAGS=-thread
 OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring)
 OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring)
-INCLUDES=-I +lablgtk2 -I ../../lib/ocaml -I +xml-light $(OCAMLNETINCLUDES)
+INCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) -I ../../lib/ocaml 
$(shell ocamlfind query -r -i-format xml-light) $(OCAMLNETINCLUDES)
 LIBS=$(OCAMLNETCMA) glibivy-ocaml.cma lablgtk.cma lablglade.cma lib-pprz.cma 
lablgnomecanvas.cma xlib-pprz.cma
 CMXA=$(LIBS:.cma=.cmxa)
 
@@ -87,7 +95,7 @@
 
 
 CC = gcc
-CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags`
+CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags` $(FPIC)
 LDFLAGS=`pkg-config gtk+-2.0 --libs` -s `pcre-config --libs` -lglibivy
 
 




reply via email to

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