mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 09:58:23 +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
|
# Quiet compilation
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
|
ifeq ($(LBITS),64)
|
||||||
|
FPIC = -ccopt -fPIC
|
||||||
|
else
|
||||||
|
FPIC =
|
||||||
|
endif
|
||||||
|
|
||||||
include ../../conf/Makefile.local
|
include ../../conf/Makefile.local
|
||||||
|
|
||||||
SIMML = stdlib.ml data.ml flightModel.ml gps.ml
|
SIMML = stdlib.ml data.ml flightModel.ml gps.ml
|
||||||
@@ -35,7 +42,7 @@ SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
|||||||
|
|
||||||
OCAMLC = ocamlc -g
|
OCAMLC = ocamlc -g
|
||||||
OCAMLOPT=ocamlopt
|
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
|
AIRBORNE = ../airborne
|
||||||
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
||||||
@@ -70,7 +77,7 @@ diffusion : stdlib.cmo diffusion.cmo
|
|||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) -c $<
|
$(Q)$(OCAMLC) $(FPIC) -c $<
|
||||||
|
|
||||||
%.cmx : %.ml
|
%.cmx : %.ml
|
||||||
@echo OOC $<
|
@echo OOC $<
|
||||||
|
|||||||
Reference in New Issue
Block a user