[Makefile] build sim target in custom mode on ARM

This commit is contained in:
Felix Ruess
2013-04-25 14:54:42 +02:00
parent dcc6377e15
commit e175d00487
+14 -3
View File
@@ -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) $^