mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
[makefile] more makefile cleaning and dynamic loading
This commit is contained in:
committed by
Felix Ruess
parent
b81ae24917
commit
446231949b
+9
-17
@@ -30,6 +30,10 @@ else
|
||||
endif
|
||||
|
||||
include ../../conf/Makefile.local
|
||||
include ../Makefile.ocaml
|
||||
|
||||
OCAMLC += -g
|
||||
PKGCOMMON=unix,str,lablgtk2,ivy,xml-light
|
||||
|
||||
SIMML = stdlib.ml data.ml flightModel.ml gps.ml
|
||||
SIMHML = $(SIMML) hitl.ml sim.ml
|
||||
@@ -38,31 +42,19 @@ SIMSML = $(SIMML) sitl.ml sim.ml
|
||||
SIMSCMO=$(SIMSML:%.ml=%.cmo)
|
||||
SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
||||
|
||||
|
||||
OCAMLC = ocamlc -g
|
||||
OCAMLOPT = ocamlopt
|
||||
OCAMLDEP = ocamldep
|
||||
OCAMLFIND = ocamlfind
|
||||
OCAML=$(shell which ocaml)
|
||||
OCAMLRUN=$(shell which ocamlrun)
|
||||
LIBPPRZDIR=../lib/ocaml
|
||||
INCLUDES= -I $(LIBPPRZDIR)
|
||||
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
||||
PKGCOMMON=unix,str,lablgtk2,ivy,xml-light
|
||||
|
||||
AIRBORNE = ../airborne
|
||||
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
||||
ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
||||
|
||||
|
||||
all : gaia sitl.cma
|
||||
all : gaia sitl.cma simhitl
|
||||
|
||||
#simhitl
|
||||
fg.so : fg.o
|
||||
gcc -shared -o $@ $^
|
||||
|
||||
simhitl : fg.o $(SIMHCMO) simhitl.cmo
|
||||
simhitl : fg.so $(SIMHCMO) simhitl.cmo
|
||||
@echo OL $@
|
||||
$(Q)$(OCAMLFIND) $(OCAMLC) -make-runtime -o simhitl_run fg.o
|
||||
$(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -use-runtime simhitl_run -o $@ -package $(PKGCOMMON) -linkpkg lib-pprz.cma gtkInit.cmo $^
|
||||
$(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -o $@ -package $(PKGCOMMON) -linkpkg lib-pprz.cma gtkInit.cmo $<
|
||||
|
||||
sitl.cma : fg.o $(SIMSCMO)
|
||||
@echo OL $@
|
||||
|
||||
Reference in New Issue
Block a user