mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 03:27:33 +08:00
[makefile] fix sim build on OS X after broken from no_custom, can't seem to build the autopilot.so properly so back to -custom just for simsitl
This commit is contained in:
+12
-1
@@ -52,7 +52,7 @@ else
|
|||||||
FPIC =
|
FPIC =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES += -I `ocamlc -where`
|
INCLUDES += -I $(shell $(OCAMLC) -where)
|
||||||
|
|
||||||
CFLAGS = -W -Wall
|
CFLAGS = -W -Wall
|
||||||
CFLAGS += $(INCLUDES)
|
CFLAGS += $(INCLUDES)
|
||||||
@@ -65,6 +65,11 @@ CFLAGS += -std=gnu99
|
|||||||
|
|
||||||
LDFLAGS = -lm
|
LDFLAGS = -lm
|
||||||
|
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
CAMLINCLUDES += $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
||||||
|
CAMLCMAS = unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# General rules
|
# General rules
|
||||||
@@ -81,9 +86,15 @@ autopilot.so : $($(TARGET).objs)
|
|||||||
@echo BUILD $@
|
@echo BUILD $@
|
||||||
$(Q)$(CC) -shared -o $(OBJDIR)/$@ $^
|
$(Q)$(CC) -shared -o $(OBJDIR)/$@ $^
|
||||||
|
|
||||||
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
$(OBJDIR)/simsitl : $($(TARGET).objs) $(SITLCMA) $(SIMSITLML)
|
||||||
|
@echo LD $@
|
||||||
|
$(Q)$(OCAMLC) -g -custom $(CAMLINCLUDES) -o $@ $(CAMLCMAS) $(MYGTKINITCMO) $^
|
||||||
|
else
|
||||||
$(OBJDIR)/simsitl : autopilot.so $(SITLCMA) $(SIMSITLML)
|
$(OBJDIR)/simsitl : autopilot.so $(SITLCMA) $(SIMSITLML)
|
||||||
@echo LD $@
|
@echo LD $@
|
||||||
$(Q)$(OCAMLC) -g $(CAMLINCLUDES) -o $@ $(LINKPKG) $(MYGTKINITCMO) $^ -dllpath $(OBJDIR) -dllpath $(SIMDIR)
|
$(Q)$(OCAMLC) -g $(CAMLINCLUDES) -o $@ $(LINKPKG) $(MYGTKINITCMO) $^ -dllpath $(OBJDIR) -dllpath $(SIMDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# The id of the A/C is hardcoded in the code (to be improved with dynlink ?)
|
# The id of the A/C is hardcoded in the code (to be improved with dynlink ?)
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
|||||||
|
|
||||||
UNAME = $(shell uname -s)
|
UNAME = $(shell uname -s)
|
||||||
ifeq ("$(UNAME)","Darwin")
|
ifeq ("$(UNAME)","Darwin")
|
||||||
CAML_CFLAGS = -I/opt/local/lib/ocaml
|
CAML_CFLAGS = -I $(shell $(OCAMLC) -where)
|
||||||
else
|
else
|
||||||
CAML_CFLAGS =
|
CAML_CFLAGS =
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user