[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Makefile
From: |
xueyue |
Subject: |
Makefile |
Date: |
Wed, 23 Jun 1999 12:34:22 +0000 |
This could be just a GNU related question:
In swarm, we use Makefile to compile, in my case,
the Makefile is like:
=============Makefile=======================
ifeq ($(SWARMHOME),)
SWARMHOME=/usr
endif
APPLICATION=mats
OBJECTS=main.o traveller/Traveller.o clock/CurrentTime.o ModelSwarm.o
node/MATSNodeItem.o node/MATSLinkItem.o router/RouteFinder.o
include $(SWARMHOME)/etc/swarm/Makefile.appl
main.o: main.m ModelSwarm.h
router/RouteFinder.o: router/RouteFinder.h router/RouteFinder.m
==============End====================================
Unlike Heatbug example, here I put some class definitions in different
directories instead of just
one. For example, MATSNodeItem.* files are kept in
node/ directory for the reason of file management.
Once MATSNodeItem.h and MATSNodeItem.m
are completed, I can compile it by calling
egcs -c -Wno-import -Wno-protocol -g -O2 -fno-inline -D_GNU_SOURCE
-I/usr/include/swarm MATSNodeItem.m
But this is very inefficient, so I hope the Makefile
can do all compiles. However, I found that the Makefile
above can only compile main.m, ModelSwarm.m (they are
in the same directory as Makefile), not other .m files.
Are there somethings missing in my Makefile?
Dr X. Huang
Center for Transport Studies
Imperial College
London SW7 2BU
(+44) 171 594 6037
vcard.vcf
Description: Card for Xueyue Huang