[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with first Swarm app
From: |
Rob Kewley |
Subject: |
Re: help with first Swarm app |
Date: |
Tue, 19 May 1998 06:49:42 -0400 |
Alex Lancaster wrote:
> We are working on a solution to this problem. Most likely we would
> make the second and third categories be treated the same by the
> linking process. This has not affected most people so far, for two
> reasons:
>
> 1. as those folks who choose an archive install should are mostly be
> aware of the consequences - a good understanding of how to control
> over Makefile.conf parameters to override should be a prerequisite for
> all folks wanting to take this road!
>
> 2. only a few users have taken the time to create their own libraries
> when creating Swarm applications - most write a single application
> which they link against the Swarm libraries. I heartily encourage
> more people to go the modular way - it can result in re-usable chunks
> that you can contribute back!
>
> However, I agree that this is particulary quirky problem and I think
> it is a good time to review the status of the space library and other
> interdependencies. It has concerned me that the space library has
> been in kind of limbo for a while.
>
> My idea is to have create a new type of macro, use:
>
> 1. keep APPLIBS for optional libraries that are part of the binary
> distribution and;
>
> 2. make a new USERLIBS macro (say) for -lneuro, -lga and
> user-developed libraries, to avoid these libraries being undefined at
> link time.
>
Based on the above, I resubmit an example Makefile and accompanying
changes to Makefile.conf which support linking against user developed
libraries and, as in this case, other useful libraries for an
application.
I have added a couple of lines to an application Makefile and
Makefile.conf which make it easy to link a swarm application against an
existing library (without having to edit OTHERINCDIRS and OTHERLIBDIRS)
in Makefile.conf each time. These changes along with a couple lines of
instruction may be a useful addition to the Swarm distribution.
I added the variable APPLIBDIRS and APPINCDIRS to Makefile as shown
below:
SWARMHOME=/usr/local/swarm-1.0.5
APPLICATION=battle
OBJECTS=Location.o MilMap.o BatSummary.o Order.o Coa.o UnitOrg.o
TaskOrg.o UnitCdr.o BattleStats.o BatModSwarm.o Combatant.o
BatObsSwarm.o CoaGenome.o MapDisplay.o GraphicControlMeasure.o
PointGraphic.o PolygonGCM.o main.o DynMatrix.o trig.o
APPLIBS= -lspace -lmylib /home/kewler/GCTP/gctpc/source/geolib.a
APPINCDIRS= -I/home/kewler/GCTP/gctpc/source/
APPLIBDIRS=
include $(SWARMHOME)/Makefile.appl
...
I edited line 469 of Makefile.conf as follows:
CFLAGS= $(OPTFLAGS) $(WARNFLAGS) -I$(INCDIR) $(OTHERINCDIRS)
$(APPINCDIRS) $(EXTRACFLAGS)
and line 480 as follows:
MINLDFLAGS= -L$(LIBDIR) $(OTHERLIBDIRS) $(APPLIBDIRS)
$(EXTRALDFLAGS)
Rob Kewley
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
==================================