mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-23 04:45:37 +08:00
Find ocaml library paths with ocamlfind and compile C with fPIC flag on 64 bit OS
This commit is contained in:
committed by
Felix Ruess
parent
2eee0b024d
commit
f0f445c7c2
@@ -23,6 +23,13 @@
|
||||
# Quiet compilation
|
||||
Q=@
|
||||
|
||||
LBITS := $(shell getconf LONG_BIT)
|
||||
ifeq ($(LBITS),64)
|
||||
FPIC = -ccopt -fPIC
|
||||
else
|
||||
FPIC =
|
||||
endif
|
||||
|
||||
include ../../conf/Makefile.local
|
||||
|
||||
SIMML = stdlib.ml data.ml flightModel.ml gps.ml
|
||||
@@ -35,7 +42,7 @@ SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
||||
|
||||
OCAMLC = ocamlc -g
|
||||
OCAMLOPT=ocamlopt
|
||||
INCLUDES= -I +lablgtk2 -I ../lib/ocaml -I +xml-light
|
||||
INCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) -I ../lib/ocaml $(shell ocamlfind query -r -i-format xml-light)
|
||||
|
||||
AIRBORNE = ../airborne
|
||||
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
||||
@@ -70,7 +77,7 @@ diffusion : stdlib.cmo diffusion.cmo
|
||||
|
||||
%.o : %.c
|
||||
@echo OC $<
|
||||
$(Q)$(OCAMLC) -c $<
|
||||
$(Q)$(OCAMLC) $(FPIC) -c $<
|
||||
|
||||
%.cmx : %.ml
|
||||
@echo OOC $<
|
||||
|
||||
Reference in New Issue
Block a user