diff --git a/conf/Makefile.sim b/conf/Makefile.sim index 3b5315cf8d..40657cc54b 100644 --- a/conf/Makefile.sim +++ b/conf/Makefile.sim @@ -58,12 +58,23 @@ CFLAGS += -std=gnu99 LDFLAGS = -lm +# build sim in custom mode for Darwin and ARM systems for now... UNAME = $(shell uname -s) -ifeq ("$(UNAME)","Darwin") - CAMLINCLUDES += $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) +ifeq ($(UNAME),Darwin) +SIMSITLCUSTOM=TRUE +endif + +MNAME = $(shell uname -m) +ifneq (,$(findstring arm,$(MNAME))) +SIMSITLCUSTOM=TRUE +endif + +ifdef SIMSITLCUSTOM + CAMLINCLUDES += $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format glibivy) CAMLCMAS = unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma endif + # # General rules # @@ -79,7 +90,7 @@ autopilot.so : $($(TARGET).objs) @echo BUILD $@ $(Q)$(CC) -shared -o $(OBJDIR)/$@ $^ -ifeq ("$(UNAME)","Darwin") +ifdef SIMSITLCUSTOM $(OBJDIR)/simsitl : $($(TARGET).objs) $(SITLCMA) $(SIMSITLML) @echo LD $@ $(Q)$(OCAMLC) -g -custom $(CAMLINCLUDES) -o $@ $(CAMLCMAS) $(MYGTKINITCMO) $^