diff --git a/Makefile b/Makefile index 7fdca008..045393bc 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,11 @@ # Libraries -LIBS = src +SUBDIRS = src -all: - for subdir in $(LIBS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ - done +all: $(SUBDIRS) -clean: - for subdir in $(LIBS); do \ - echo $@ in $$subdir; \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done +clean: $(SUBDIRS) + +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/Makefile b/src/Makefile index 19951ed1..56bf2fc7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,41 +20,38 @@ include makedefs # simulation : - # terrain : - # -PROJECTS = basic -PROJECTS += basicGL instruments -PROJECTS += dafif -PROJECTS += ioDevice -PROJECTS += linearSys -PROJECTS += simulation sensors terrain -PROJECTS += dis -PROJECTS += dynamics -PROJECTS += maps -PROJECTS += recorder +SUBDIRS = basic +SUBDIRS += basicGL +SUBDIRS += instruments +SUBDIRS += dafif +SUBDIRS += ioDevice +SUBDIRS += linearSys +SUBDIRS += simulation sensors terrain +SUBDIRS += dis +SUBDIRS += dynamics +SUBDIRS += maps +SUBDIRS += recorder # # GUI interface libraries # -PROJECTS += "gui/glut" +SUBDIRS += "gui/glut" # Out-the-Window interface classes to talk to visual systems # - CIGI Class Library 3.x interface # - download and install cigicl -PROJECTS += otw +SUBDIRS += otw # # HLA interface library # -#PROJECTS += "hla" +#SUBDIRS += "hla" # # Rules # -all: - @echo ${OE_ROOT} - for subdir in $(PROJECTS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ - done + +all: $(SUBDIRS) install: uninstall -cp -r ../include/openeaagles /usr/local/include/openeaagles @@ -64,10 +61,8 @@ uninstall: -rm -rf /usr/local/include/openeaagles -rm -rf /usr/local/lib/openeaagles -clean: +clean: $(SUBDIRS) -rm -f *.o - for subdir in $(PROJECTS); do \ - echo $@ in $$subdir; \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) \ No newline at end of file diff --git a/src/basic/Makefile b/src/basic/Makefile index ada8df96..10c56067 100644 --- a/src/basic/Makefile +++ b/src/basic/Makefile @@ -4,88 +4,79 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(support.o) \ - $(LIB)(basicFF.o) \ - $(LIB)(Boolean.o) \ - $(LIB)(Cie.o) \ - $(LIB)(Cmy.o) \ - $(LIB)(Color.o) \ - $(LIB)(Complex.o) \ - $(LIB)(Component.o) \ - $(LIB)(Decibel.o) \ - $(LIB)(EarthModel.o) \ - $(LIB)(Factory.o) \ - $(LIB)(FileReader.o) \ - $(LIB)(Float.o) \ - $(LIB)(Function.o) \ - $(LIB)(Functions.o) \ - $(LIB)(Hls.o) \ - $(LIB)(Hsva.o) \ - $(LIB)(Hsv.o) \ - $(LIB)(Identifier.o) \ - $(LIB)(Integer.o) \ - $(LIB)(IoAdapter.o) \ - $(LIB)(IoData.o) \ - $(LIB)(IoDevice.o) \ - $(LIB)(IoHandler.o) \ - $(LIB)(LatLon.o) \ - $(LIB)(Lexical.o) \ - $(LIB)(List.o) \ - $(LIB)(Locus.o) \ - $(LIB)(Logger.o) \ - $(LIB)(Matrix.o) \ - $(LIB)(Nav.o) \ - $(LIB)(NavDR.o) \ - $(LIB)(NetHandler.o) \ - $(LIB)(Number.o) \ - $(LIB)(Object.o) \ - $(LIB)(Operators.o) \ - $(LIB)(Pair.o) \ - $(LIB)(PairStream.o) \ - $(LIB)(Parser.o) \ - $(LIB)(Rgba.o) \ - $(LIB)(Rgb.o) \ - $(LIB)(Rng.o) \ - $(LIB)(SlotTable.o) \ - $(LIB)(Stack.o) \ - $(LIB)(Statistic.o) \ - $(LIB)(StateMachine.o) \ - $(LIB)(String.o) \ - $(LIB)(Table.o) \ - $(LIB)(Tables.o) \ - $(LIB)(Terrain.o) \ - $(LIB)(Thread.o) \ - $(LIB)(ThreadPool.o) \ - $(LIB)(Timers.o) \ - $(LIB)(Transforms.o) \ - $(LIB)(Vectors.o) \ - $(LIB)(Yiq.o) + support.o \ + basicFF.o \ + Boolean.o \ + Cie.o \ + Cmy.o \ + Color.o \ + Complex.o \ + Component.o \ + Decibel.o \ + EarthModel.o \ + Factory.o \ + FileReader.o \ + Float.o \ + Hls.o \ + Hsva.o \ + Hsv.o \ + Identifier.o \ + Integer.o \ + IoAdapter.o \ + IoData.o \ + IoDevice.o \ + IoHandler.o \ + LatLon.o \ + Lexical.o \ + List.o \ + Locus.o \ + Logger.o \ + Matrix.o \ + Nav.o \ + NavDR.o \ + NetHandler.o \ + Number.o \ + Object.o \ + Operators.o \ + Pair.o \ + PairStream.o \ + Parser.o \ + Rgba.o \ + Rgb.o \ + Rng.o \ + SlotTable.o \ + Stack.o \ + Statistic.o \ + StateMachine.o \ + String.o \ + Terrain.o \ + Thread.o \ + ThreadPool.o \ + Timers.o \ + Transforms.o \ + Vectors.o \ + Yiq.o SUBDIRS = distributions functors nethandlers osg ubf units util -all: subdirs ${OBJS} - -subdirs: +all: + $(MAKE) compile + $(MAKE) archive + +compile: $(SUBDIRS) ${OBJS} + +archive: for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ + $(MAKE) -C $$subdir $(MAKECMDGOALS); \ done + ar rv $(LIB) ${OBJS} -$(LIB)(Lexical.o): Lexical.cpp Parser.cpp Parser.hpp - -#Parser.cpp: Parser.y -# dos2unix Parser.y -# bison -t Parser.y -o Parser.cpp - -#Lexical.cpp: Lexical.l -# dos2unix Lexical.l -# flex -f -oLexical.cpp Lexical.l +Lexical.o: Lexical.cpp Parser.cpp Parser.hpp -clean: +clean: $(SUBDIRS) -rm -f *.o - for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done -rm -f $(LIB) + +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/basic/distributions/Makefile b/src/basic/distributions/Makefile index dc4feff7..ef67c603 100644 --- a/src/basic/distributions/Makefile +++ b/src/basic/distributions/Makefile @@ -4,12 +4,19 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(Exponential.o) \ - $(LIB)(Lognormal.o) \ - $(LIB)(Pareto.o) \ - $(LIB)(Uniform.o) + Exponential.o \ + Lognormal.o \ + Pareto.o \ + Uniform.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/basic/functors/Makefile b/src/basic/functors/Makefile index be44e69b..ec1027eb 100644 --- a/src/basic/functors/Makefile +++ b/src/basic/functors/Makefile @@ -4,12 +4,19 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(Function.o) \ - $(LIB)(Functions.o) \ - $(LIB)(Table.o) \ - $(LIB)(Tables.o) + Function.o \ + Functions.o \ + Table.o \ + Tables.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/basic/nethandlers/Makefile b/src/basic/nethandlers/Makefile index a360e376..feb576b5 100644 --- a/src/basic/nethandlers/Makefile +++ b/src/basic/nethandlers/Makefile @@ -4,16 +4,23 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(PosixHandler.o) \ - $(LIB)(TcpClient.o) \ - $(LIB)(TcpHandler.o) \ - $(LIB)(TcpServerMultiple.o) \ - $(LIB)(TcpServerSingle.o) \ - $(LIB)(UdpBroadcastHandler.o) \ - $(LIB)(UdpMulticastHandler.o) \ - $(LIB)(UdpUnicastHandler.o) + PosixHandler.o \ + TcpClient.o \ + TcpHandler.o \ + TcpServerMultiple.o \ + TcpServerSingle.o \ + UdpBroadcastHandler.o \ + UdpMulticastHandler.o \ + UdpUnicastHandler.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/basic/osg/Makefile b/src/basic/osg/Makefile index 0954458c..c9642eea 100644 --- a/src/basic/osg/Makefile +++ b/src/basic/osg/Makefile @@ -4,13 +4,20 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(Math.o) \ - $(LIB)(Matrixd.o) \ - $(LIB)(MatrixDecomposition.o) \ - $(LIB)(Matrixf.o) \ - $(LIB)(Quat.o) + Math.o \ + Matrixd.o \ + MatrixDecomposition.o \ + Matrixf.o \ + Quat.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/basic/ubf/Makefile b/src/basic/ubf/Makefile index eedb65e7..540cb083 100644 --- a/src/basic/ubf/Makefile +++ b/src/basic/ubf/Makefile @@ -4,13 +4,20 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(Action.o) \ - $(LIB)(Agent.o) \ - $(LIB)(Arbiter.o) \ - $(LIB)(Behavior.o) \ - $(LIB)(State.o) + Action.o \ + Agent.o \ + Arbiter.o \ + Behavior.o \ + State.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/basic/units/Makefile b/src/basic/units/Makefile index 22d51f7a..54facf84 100644 --- a/src/basic/units/Makefile +++ b/src/basic/units/Makefile @@ -4,22 +4,29 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(Angles.o) \ - $(LIB)(AngularVelocity.o) \ - $(LIB)(Areas.o) \ - $(LIB)(Density.o) \ - $(LIB)(Distances.o) \ - $(LIB)(Energies.o) \ - $(LIB)(FlowRate.o) \ - $(LIB)(Forces.o) \ - $(LIB)(Frequencies.o) \ - $(LIB)(LinearVelocity.o) \ - $(LIB)(Masses.o) \ - $(LIB)(Powers.o) \ - $(LIB)(Times.o) \ - $(LIB)(Volumes.o) + Angles.o \ + AngularVelocity.o \ + Areas.o \ + Density.o \ + Distances.o \ + Energies.o \ + FlowRate.o \ + Forces.o \ + Frequencies.o \ + LinearVelocity.o \ + Masses.o \ + Powers.o \ + Times.o \ + Volumes.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/basic/util/Makefile b/src/basic/util/Makefile index 750aa793..e82845fe 100644 --- a/src/basic/util/Makefile +++ b/src/basic/util/Makefile @@ -4,9 +4,16 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasic.a OBJS = \ - $(LIB)(lfi.o) + lfi.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/basicGL/Makefile b/src/basicGL/Makefile index 6a25bc3e..0e10b6de 100644 --- a/src/basicGL/Makefile +++ b/src/basicGL/Makefile @@ -4,41 +4,44 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeBasicGL.a OBJS = \ - $(LIB)(basicGLFF.o) \ - $(LIB)(BmpTexture.o) \ - $(LIB)(BitmapFont.o) \ - $(LIB)(Clip3D.o) \ - $(LIB)(ColorGradient.o) \ - $(LIB)(ColorRotary.o) \ - $(LIB)(Display.o) \ - $(LIB)(Factory.o) \ - $(LIB)(Field.o) \ - $(LIB)(Font.o) \ - $(LIB)(FtglFonts.o) \ - $(LIB)(Graphic.o) \ - $(LIB)(Image.o) \ - $(LIB)(Material.o) \ - $(LIB)(Page.o) \ - $(LIB)(Polygon.o) \ - $(LIB)(Readouts.o) \ - $(LIB)(Reformat.o) \ - $(LIB)(Rotators.o) \ - $(LIB)(Scanline.o) \ - $(LIB)(Shapes.o) \ - $(LIB)(StrokeFont.o) \ - $(LIB)(Texture.o) \ - $(LIB)(MfdPage.o) \ - $(LIB)(MapPage.o) \ - $(LIB)(SymbolLoader.o) \ - $(LIB)(Translator.o) + basicGLFF.o \ + BmpTexture.o \ + BitmapFont.o \ + Clip3D.o \ + ColorGradient.o \ + ColorRotary.o \ + Display.o \ + Factory.o \ + Field.o \ + Font.o \ + FtglFonts.o \ + Graphic.o \ + Image.o \ + Material.o \ + Page.o \ + Polygon.o \ + Readouts.o \ + Reformat.o \ + Rotators.o \ + Scanline.o \ + Shapes.o \ + StrokeFont.o \ + Texture.o \ + MfdPage.o \ + MapPage.o \ + SymbolLoader.o \ + Translator.o CPPFLAGS += -I$(FREETYPE2_INC_DIR) -all: ${OBJS} - -#Reformat.cpp: Reformat.l -# dos2unix Reformat.l -# flex -f -oReformat.cpp Reformat.l +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/dafif/Makefile b/src/dafif/Makefile index f42c89cb..4a309770 100644 --- a/src/dafif/Makefile +++ b/src/dafif/Makefile @@ -4,20 +4,27 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeDafif.a OBJS = \ - $(LIB)(dafifFF.o) \ - $(LIB)(Airport.o) \ - $(LIB)(AirportLoader.o) \ - $(LIB)(Record.o) \ - $(LIB)(Database.o) \ - $(LIB)(Factory.o) \ - $(LIB)(Ils.o) \ - $(LIB)(Navaid.o) \ - $(LIB)(NavaidLoader.o) \ - $(LIB)(Runway.o) \ - $(LIB)(Waypoint.o) \ - $(LIB)(WaypointLoader.o) + dafifFF.o \ + Airport.o \ + AirportLoader.o \ + Record.o \ + Database.o \ + Factory.o \ + Ils.o \ + Navaid.o \ + NavaidLoader.o \ + Runway.o \ + Waypoint.o \ + WaypointLoader.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/dis/Makefile b/src/dis/Makefile index 7c684a51..63b970ed 100644 --- a/src/dis/Makefile +++ b/src/dis/Makefile @@ -4,22 +4,28 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeDis.a OBJS = \ - $(LIB)(disFF.o) \ - $(LIB)(EmissionPduHandler.o) \ - $(LIB)(Factory.o) \ - $(LIB)(NetIO.o) \ - $(LIB)(NetIO-entity-state.o) \ - $(LIB)(NetIO-munition-detonation.o) \ - $(LIB)(NetIO-weapon-fire.o) \ - $(LIB)(Nib.o) \ - $(LIB)(Nib-entity-state.o) \ - $(LIB)(Nib-iff.o) \ - $(LIB)(Nib-munition-detonation.o) \ - $(LIB)(Nib-weapon-fire.o) \ - $(LIB)(Ntm.o) + disFF.o \ + EmissionPduHandler.o \ + Factory.o \ + NetIO.o \ + NetIO-entity-state.o \ + NetIO-munition-detonation.o \ + NetIO-weapon-fire.o \ + Nib.o \ + Nib-entity-state.o \ + Nib-iff.o \ + Nib-munition-detonation.o \ + Nib-weapon-fire.o \ + Ntm.o - -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/dynamics/Makefile b/src/dynamics/Makefile index 76a0ab8f..63a3e5c0 100644 --- a/src/dynamics/Makefile +++ b/src/dynamics/Makefile @@ -5,16 +5,21 @@ LIB = $(OPENEAAGLES_LIB_DIR)/liboeDynamics.a CPPFLAGS += -I$(JSBSIM_INC_DIR) -SUBDIRS = - OBJS = \ - $(LIB)(Factory.o) \ - $(LIB)(JSBSimModel.o) \ - $(LIB)(LaeroModel.o) \ - $(LIB)(RacModel.o) \ - $(LIB)(dynamicsFF.o) + Factory.o \ + JSBSimModel.o \ + LaeroModel.o \ + RacModel.o \ + dynamicsFF.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/gui/glut/Makefile b/src/gui/glut/Makefile index de225e93..5e07e3bb 100644 --- a/src/gui/glut/Makefile +++ b/src/gui/glut/Makefile @@ -4,13 +4,20 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeGlut.a OBJS = \ - $(LIB)(Factory.o) \ - $(LIB)(glutFF.o) \ - $(LIB)(GlutDisplay.o) \ - $(LIB)(Shapes3D.o) - -all: ${OBJS} + Factory.o \ + glutFF.o \ + GlutDisplay.o \ + Shapes3D.o +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} + clean: -rm -f *.o -rm -f $(LIB) diff --git a/src/instruments/Makefile b/src/instruments/Makefile index 204001bf..4cfe5853 100644 --- a/src/instruments/Makefile +++ b/src/instruments/Makefile @@ -4,21 +4,28 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(Factory.o) \ - $(LIB)(instrumentsFF.o) \ - $(LIB)(Instrument.o) + Factory.o \ + instrumentsFF.o \ + Instrument.o SUBDIRS = adi buttons dials landingGear maps eng gauges eadi3D -all: subdirs ${OBJS} - -subdirs: +all: + $(MAKE) compile + $(MAKE) archive + +compile: $(SUBDIRS) ${OBJS} + +archive: for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ + $(MAKE) -C $$subdir $(MAKECMDGOALS); \ done + ar rv $(LIB) ${OBJS} -clean: +clean: $(SUBDIRS) -rm -f *.o -rm -f $(LIB) + +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/instruments/adi/Makefile b/src/instruments/adi/Makefile index f6d766e8..5f665117 100644 --- a/src/instruments/adi/Makefile +++ b/src/instruments/adi/Makefile @@ -4,10 +4,17 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(Adi.o) \ - $(LIB)(GhostHorizon.o) + Adi.o \ + GhostHorizon.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/instruments/buttons/Makefile b/src/instruments/buttons/Makefile index c3c5f17a..95d552b7 100644 --- a/src/instruments/buttons/Makefile +++ b/src/instruments/buttons/Makefile @@ -4,14 +4,21 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(Button.o) \ - $(LIB)(PushButton.o) \ - $(LIB)(RotarySwitch.o) \ - $(LIB)(Knob.o) \ - $(LIB)(Switch.o) \ - $(LIB)(SolenoidSwitch.o) + Button.o \ + PushButton.o \ + RotarySwitch.o \ + Knob.o \ + Switch.o \ + SolenoidSwitch.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/instruments/dials/Makefile b/src/instruments/dials/Makefile index 1bc0ea39..f7229b54 100644 --- a/src/instruments/dials/Makefile +++ b/src/instruments/dials/Makefile @@ -4,14 +4,21 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(AltitudeDial.o) \ - $(LIB)(AnalogDial.o) \ - $(LIB)(DialArcSegment.o) \ - $(LIB)(DialPointer.o) \ - $(LIB)(DialTickMarks.o) \ - $(LIB)(GMeterDial.o) + AltitudeDial.o \ + AnalogDial.o \ + DialArcSegment.o \ + DialPointer.o \ + DialTickMarks.o \ + GMeterDial.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/instruments/eadi3D/Makefile b/src/instruments/eadi3D/Makefile index 2b69758d..29c64d9b 100644 --- a/src/instruments/eadi3D/Makefile +++ b/src/instruments/eadi3D/Makefile @@ -4,11 +4,18 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(Eadi3DObjects.o) \ - $(LIB)(Eadi3DPage.o) \ - $(LIB)(IrisGLCompat.o) + Eadi3DObjects.o \ + Eadi3DPage.o \ + IrisGLCompat.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/instruments/eng/Makefile b/src/instruments/eng/Makefile index f97b549a..75956f40 100644 --- a/src/instruments/eng/Makefile +++ b/src/instruments/eng/Makefile @@ -4,9 +4,16 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(EngPage.o) + EngPage.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/instruments/gauges/Makefile b/src/instruments/gauges/Makefile index 95548184..e3c16ca8 100644 --- a/src/instruments/gauges/Makefile +++ b/src/instruments/gauges/Makefile @@ -4,13 +4,20 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(AnalogGauge.o) \ - $(LIB)(AoaIndexer.o) \ - $(LIB)(GaugeSlider.o) \ - $(LIB)(Tape.o) \ - $(LIB)(TickMarks.o) + AnalogGauge.o \ + AoaIndexer.o \ + GaugeSlider.o \ + Tape.o \ + TickMarks.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/instruments/landingGear/Makefile b/src/instruments/landingGear/Makefile index 9709570c..f33b355e 100644 --- a/src/instruments/landingGear/Makefile +++ b/src/instruments/landingGear/Makefile @@ -4,10 +4,17 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(LandingGear.o) \ - $(LIB)(LandingLight.o) + LandingGear.o \ + LandingLight.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/instruments/maps/Makefile b/src/instruments/maps/Makefile index d865259f..76125486 100644 --- a/src/instruments/maps/Makefile +++ b/src/instruments/maps/Makefile @@ -4,10 +4,17 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeInstruments.a OBJS = \ - $(LIB)(BearingPointer.o) \ - $(LIB)(CompassRose.o) + BearingPointer.o \ + CompassRose.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/ioDevice/Makefile b/src/ioDevice/Makefile index 0a41d2a1..86d89d9f 100644 --- a/src/ioDevice/Makefile +++ b/src/ioDevice/Makefile @@ -4,23 +4,30 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeIoDevice.a OBJS = \ - $(LIB)(Ai2DiSwitch.o) \ - $(LIB)(AnalogInput.o) \ - $(LIB)(AnalogOutput.o) \ - $(LIB)(DiscreteInput.o) \ - $(LIB)(DiscreteOutput.o) \ - $(LIB)(Factory.o) \ - $(LIB)(IoData.o) \ - $(LIB)(ioDeviceFF.o) \ - $(LIB)(SignalGen.o) \ - $(LIB)(UsbJoystick.o) + Ai2DiSwitch.o \ + AnalogInput.o \ + AnalogOutput.o \ + DiscreteInput.o \ + DiscreteOutput.o \ + Factory.o \ + IoData.o \ + ioDeviceFF.o \ + SignalGen.o \ + UsbJoystick.o # specific IO devices to be included in compile ifdef JOYSTICKDEVICE -OBJS += $(LIB)(linux/UsbJoystickImp.o) +OBJS += linux/UsbJoystickImp.o endif -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/linearSys/Makefile b/src/linearSys/Makefile index 8ca0ab79..f7ec490e 100644 --- a/src/linearSys/Makefile +++ b/src/linearSys/Makefile @@ -4,22 +4,28 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeLinearSys.a OBJS = \ - $(LIB)(DiffEquation.o) \ - $(LIB)(FirstOrderTf.o) \ - $(LIB)(LagFilter.o) \ - $(LIB)(Limit01.o) \ - $(LIB)(Limit11.o) \ - $(LIB)(Limit.o) \ - $(LIB)(LimitFunc.o) \ - $(LIB)(LowpassFilter.o) \ - $(LIB)(SaH.o) \ - $(LIB)(ScalerFunc.o) \ - $(LIB)(SecondOrderTf.o) \ - $(LIB)(Sz1.o) \ - $(LIB)(Sz2.o) + DiffEquation.o \ + FirstOrderTf.o \ + LagFilter.o \ + Limit01.o \ + Limit11.o \ + Limit.o \ + LimitFunc.o \ + LowpassFilter.o \ + SaH.o \ + ScalerFunc.o \ + SecondOrderTf.o \ + Sz1.o \ + Sz2.o - -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/maps/Makefile b/src/maps/Makefile index 9d102ee2..a23dae90 100644 --- a/src/maps/Makefile +++ b/src/maps/Makefile @@ -4,20 +4,27 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeMaps.a OBJS = \ - $(LIB)(Factory.o) \ - $(LIB)(mapsFF.o) + Factory.o \ + mapsFF.o SUBDIRS = rpfMap -all: subdirs ${OBJS} - -subdirs: +all: + $(MAKE) compile + $(MAKE) archive + +compile: $(SUBDIRS) ${OBJS} + +archive: for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ + $(MAKE) -C $$subdir $(MAKECMDGOALS); \ done + ar rv $(LIB) ${OBJS} -clean: +clean: $(SUBDIRS) -rm -f *.o -rm -f $(LIB) + +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/maps/rpfMap/Makefile b/src/maps/rpfMap/Makefile index 35c9a657..835688d2 100644 --- a/src/maps/rpfMap/Makefile +++ b/src/maps/rpfMap/Makefile @@ -4,18 +4,25 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeMaps.a OBJS = \ - $(LIB)(CadrgClut.o) \ - $(LIB)(CadrgFile.o) \ - $(LIB)(CadrgFrame.o) \ - $(LIB)(CadrgFrameEntry.o) \ - $(LIB)(CadrgMap.o) \ - $(LIB)(CadrgTocEntry.o) \ - $(LIB)(MapDrawer.o) \ - $(LIB)(TexturePager.o) \ - $(LIB)(TextureTable.o) \ - $(LIB)(Support.o) + CadrgClut.o \ + CadrgFile.o \ + CadrgFrame.o \ + CadrgFrameEntry.o \ + CadrgMap.o \ + CadrgTocEntry.o \ + MapDrawer.o \ + TexturePager.o \ + TextureTable.o \ + Support.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/otw/Makefile b/src/otw/Makefile index c4d0de78..27533543 100644 --- a/src/otw/Makefile +++ b/src/otw/Makefile @@ -1,18 +1,22 @@ # include ../makedefs -#CPPFLAGS += -DCIGI_LITTLE_ENDIAN -#CPPFLAGS += -I$(CIGICL_DIR) - LIB = $(OPENEAAGLES_LIB_DIR)/liboeOtw.a OBJS = \ - $(LIB)(Factory.o) \ - $(LIB)(OtwCigiCl.o) \ - $(LIB)(OtwPC.o) \ - $(LIB)(otwFF.o) + Factory.o \ + OtwCigiCl.o \ + OtwPC.o \ + otwFF.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/recorder/Makefile b/src/recorder/Makefile index 3107a352..cae416e5 100644 --- a/src/recorder/Makefile +++ b/src/recorder/Makefile @@ -4,32 +4,39 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeRecorder.a OBJS = \ - $(LIB)(DataRecorder.o) \ - $(LIB)(DataRecordHandle.o) \ - $(LIB)(Factory.o) \ - $(LIB)(FileReader.o) \ - $(LIB)(FileWriter.o) \ - $(LIB)(InputHandler.o) \ - $(LIB)(NetInput.o) \ - $(LIB)(NetOutput.o) \ - $(LIB)(OutputHandler.o) \ - $(LIB)(PrintHandler.o) \ - $(LIB)(PrintPlayer.o) \ - $(LIB)(PrintSelected.o) \ - $(LIB)(recorderFF.o) \ - $(LIB)(TabPrinter.o) + DataRecorder.o \ + DataRecordHandle.o \ + Factory.o \ + FileReader.o \ + FileWriter.o \ + InputHandler.o \ + NetInput.o \ + NetOutput.o \ + OutputHandler.o \ + PrintHandler.o \ + PrintPlayer.o \ + PrintSelected.o \ + recorderFF.o \ + TabPrinter.o SUBDIRS = protobuf -all: subdirs ${OBJS} - -subdirs: +all: + $(MAKE) compile + $(MAKE) archive + +compile: $(SUBDIRS) ${OBJS} + +archive: for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ + $(MAKE) -C $$subdir $(MAKECMDGOALS); \ done + ar rv $(LIB) ${OBJS} -clean: +clean: $(SUBDIRS) -rm -f *.o -rm -f $(LIB) + +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/recorder/protobuf/Makefile b/src/recorder/protobuf/Makefile index 49ab8220..7a50c8b3 100644 --- a/src/recorder/protobuf/Makefile +++ b/src/recorder/protobuf/Makefile @@ -3,10 +3,19 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeRecorder.a +CPPFLAGS += -I$(OE_ROOT)/include/openeaagles/recorder/protobuf + OBJS = \ - $(LIB)(DataRecord.pb.o) + DataRecord.pb.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/sensors/Makefile b/src/sensors/Makefile index c1566981..be86a988 100644 --- a/src/sensors/Makefile +++ b/src/sensors/Makefile @@ -4,13 +4,20 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeSensors.a OBJS = \ - $(LIB)(Factory.o) \ - $(LIB)(Gmti.o) \ - $(LIB)(sensorsFF.o) \ - $(LIB)(Stt.o) \ - $(LIB)(Tws.o) + Factory.o \ + Gmti.o \ + sensorsFF.o \ + Stt.o \ + Tws.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/simulation/Makefile b/src/simulation/Makefile index b1a2980e..a488aaa1 100644 --- a/src/simulation/Makefile +++ b/src/simulation/Makefile @@ -4,106 +4,107 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeSimulation.a OBJS = \ - $(LIB)(Aam.o) \ - $(LIB)(Actions.o) \ - $(LIB)(Agm.o) \ - $(LIB)(AircraftIrSignature.o) \ - $(LIB)(AirVehicle.o) \ - $(LIB)(AngleOnlyTrackManager.o) \ - $(LIB)(Antenna.o) \ - $(LIB)(Autopilot.o) \ - $(LIB)(AvionicsPod.o) \ - $(LIB)(Bomb.o) \ - $(LIB)(Buildings.o) \ - $(LIB)(Bullseye.o) \ - $(LIB)(CollisionDetect.o) \ - $(LIB)(Datalink.o) \ - $(LIB)(DataRecorder.o) \ - $(LIB)(Designator.o) \ - $(LIB)(DynamicsModel.o) \ - $(LIB)(Effects.o) \ - $(LIB)(Emission.o) \ - $(LIB)(ExternalStore.o) \ - $(LIB)(Factory.o) \ - $(LIB)(FuelTank.o) \ - $(LIB)(Gimbal.o) \ - $(LIB)(Gps.o) \ - $(LIB)(GroundVehicle.o) \ - $(LIB)(Guns.o) \ - $(LIB)(Iff.o) \ - $(LIB)(Image.o) \ - $(LIB)(Ins.o) \ - $(LIB)(IrAtmosphere.o) \ - $(LIB)(IrAtmosphere1.o) \ - $(LIB)(IrQueryMsg.o) \ - $(LIB)(IrSeeker.o) \ - $(LIB)(IrSensor.o) \ - $(LIB)(IrShapes.o) \ - $(LIB)(IrSignature.o) \ - $(LIB)(IrSystem.o) \ - $(LIB)(Jammer.o) \ - $(LIB)(LifeForms.o) \ - $(LIB)(MergingIrSensor.o) \ - $(LIB)(Message.o) \ - $(LIB)(Missile.o) \ - $(LIB)(MultiActorAgent.o) \ - $(LIB)(Navigation.o) \ - $(LIB)(NavRadios.o) \ - $(LIB)(NetIO.o) \ - $(LIB)(Nib.o) \ - $(LIB)(Ntm.o) \ - $(LIB)(OnboardComputer.o) \ - $(LIB)(Otw.o) \ - $(LIB)(Pilot.o) \ - $(LIB)(Player.o) \ - $(LIB)(Radar.o) \ - $(LIB)(Radio.o) \ - $(LIB)(RfSensor.o) \ - $(LIB)(RfSystem.o) \ - $(LIB)(Route.o) \ - $(LIB)(Rwr.o) \ - $(LIB)(Sam.o) \ - $(LIB)(SamVehicles.o) \ - $(LIB)(Sar.o) \ - $(LIB)(ScanGimbal.o) \ - $(LIB)(SensorMsg.o) \ - $(LIB)(Ships.o) \ - $(LIB)(Signatures.o) \ - $(LIB)(SimAgent.o) \ - $(LIB)(SimLogger.o) \ - $(LIB)(Simulation.o) \ - $(LIB)(simulationFF.o) \ - $(LIB)(SpaceVehicle.o) \ - $(LIB)(StabilizingGimbal.o) \ - $(LIB)(Station.o) \ - $(LIB)(Steerpoint.o) \ - $(LIB)(Stores.o) \ - $(LIB)(StoresMgr.o) \ - $(LIB)(SynchronizedState.o) \ - $(LIB)(System.o) \ - $(LIB)(TabLogger.o) \ - $(LIB)(TargetData.o) \ - $(LIB)(Tdb.o) \ - $(LIB)(Track.o) \ - $(LIB)(TrackManager.o) \ - $(LIB)(Weapon.o) + Aam.o \ + Actions.o \ + Agm.o \ + AircraftIrSignature.o \ + AirVehicle.o \ + AngleOnlyTrackManager.o \ + Antenna.o \ + Autopilot.o \ + AvionicsPod.o \ + Bomb.o \ + Buildings.o \ + Bullseye.o \ + CollisionDetect.o \ + Datalink.o \ + DataRecorder.o \ + Designator.o \ + DynamicsModel.o \ + Effects.o \ + Emission.o \ + ExternalStore.o \ + Factory.o \ + FuelTank.o \ + Gimbal.o \ + Gps.o \ + GroundVehicle.o \ + Guns.o \ + Iff.o \ + Image.o \ + Ins.o \ + IrAtmosphere.o \ + IrAtmosphere1.o \ + IrQueryMsg.o \ + IrSeeker.o \ + IrSensor.o \ + IrShapes.o \ + IrSignature.o \ + IrSystem.o \ + Jammer.o \ + LifeForms.o \ + MergingIrSensor.o \ + Message.o \ + Missile.o \ + MultiActorAgent.o \ + Navigation.o \ + NavRadios.o \ + NetIO.o \ + Nib.o \ + Ntm.o \ + OnboardComputer.o \ + Otw.o \ + Pilot.o \ + Player.o \ + Radar.o \ + Radio.o \ + RfSensor.o \ + RfSystem.o \ + Route.o \ + Rwr.o \ + Sam.o \ + SamVehicles.o \ + Sar.o \ + ScanGimbal.o \ + SensorMsg.o \ + Ships.o \ + Signatures.o \ + SimAgent.o \ + SimLogger.o \ + Simulation.o \ + simulationFF.o \ + SpaceVehicle.o \ + StabilizingGimbal.o \ + Station.o \ + Steerpoint.o \ + Stores.o \ + StoresMgr.o \ + SynchronizedState.o \ + System.o \ + TabLogger.o \ + TargetData.o \ + Tdb.o \ + Track.o \ + TrackManager.o \ + Weapon.o SUBDIRS = dynamics -all: ${OBJS} - -all: subdirs ${OBJS} - -subdirs: +all: + $(MAKE) compile + $(MAKE) archive + +compile: $(SUBDIRS) ${OBJS} + +archive: for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ + $(MAKE) -C $$subdir $(MAKECMDGOALS); \ done + ar rv $(LIB) ${OBJS} -clean: +clean: $(SUBDIRS) -rm -f *.o - for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done -rm -f $(LIB) + +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/simulation/dynamics/Makefile b/src/simulation/dynamics/Makefile index 140b1cb7..bec57c3a 100644 --- a/src/simulation/dynamics/Makefile +++ b/src/simulation/dynamics/Makefile @@ -4,10 +4,17 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeSimulation.a OBJS = \ - $(LIB)(AerodynamicsModel.o) \ - $(LIB)(SpaceDynamicsModel.o) + AerodynamicsModel.o \ + SpaceDynamicsModel.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/terrain/Makefile b/src/terrain/Makefile index 65670995..b3ae0660 100644 --- a/src/terrain/Makefile +++ b/src/terrain/Makefile @@ -4,21 +4,28 @@ include ../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeTerrain.a OBJS = \ - $(LIB)(DataFile.o) \ - $(LIB)(Factory.o) \ - $(LIB)(QuadMap.o) \ - $(LIB)(terrainFF.o) + DataFile.o \ + Factory.o \ + QuadMap.o \ + terrainFF.o SUBDIRS = ded dted srtm -all: subdirs ${OBJS} - -subdirs: +all: + $(MAKE) compile + $(MAKE) archive + +compile: $(SUBDIRS) ${OBJS} + +archive: for subdir in $(SUBDIRS); do \ - echo making $@ in $$subdir; \ - (cd $$subdir && $(MAKE)) || exit 1; \ + $(MAKE) -C $$subdir $(MAKECMDGOALS); \ done + ar rv $(LIB) ${OBJS} -clean: +clean: $(SUBDIRS) -rm -f *.o -rm -f $(LIB) + +$(SUBDIRS):: + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/terrain/ded/Makefile b/src/terrain/ded/Makefile index 1b708d12..cf79d63d 100644 --- a/src/terrain/ded/Makefile +++ b/src/terrain/ded/Makefile @@ -3,9 +3,16 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeTerrain.a -OBJS = $(LIB)(DedFile.o) +OBJS = DedFile.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/terrain/dted/Makefile b/src/terrain/dted/Makefile index 956af8cc..6cd85938 100644 --- a/src/terrain/dted/Makefile +++ b/src/terrain/dted/Makefile @@ -3,9 +3,16 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeTerrain.a -OBJS = $(LIB)(DtedFile.o) +OBJS = DtedFile.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o diff --git a/src/terrain/srtm/Makefile b/src/terrain/srtm/Makefile index 8b0a041e..40ab1c8f 100644 --- a/src/terrain/srtm/Makefile +++ b/src/terrain/srtm/Makefile @@ -3,9 +3,16 @@ include ../../makedefs LIB = $(OPENEAAGLES_LIB_DIR)/liboeTerrain.a -OBJS = $(LIB)(SrtmHgtFile.o) +OBJS = SrtmHgtFile.o -all: ${OBJS} +all: + $(MAKE) compile + $(MAKE) archive + +compile: ${OBJS} + +archive: + ar rv $(LIB) ${OBJS} clean: -rm -f *.o