# Make file for Maryland Routing Simulator # Top level mars directory MARSDIR = . # You need to supply directories for libraries and include files # only if they are not in a standard directory. LIBDIRS = INCDIRS = #LIBDIRS = #INCDIRS = # MaRS Libraries, and library directories MARSLIBS = -L$(MARSDIR)/lib $(LIBDIRS) -lMaRSSim -lMaRSComps # Add here the files that you are editing, so that they will override the # copies in the library. # OBJS = MISCFILES = CO = co # If using GCC: # INLINE should be defined only if you are using GNUC. # define OFFLINE for more efficient code if you do not want x DEFINES = -DBSD -DMEMPOOL -DINLINE -DNoX GFLAG = OFLAG = -O CC = gcc # If using cc: # (You can't use both -g and -O with cc.) # define OFFLINE for more efficient code if you do not want x #DEFINES = -DBSD -DMEMPOOL -DNoX #GFLAG = #OFLAG = -O CFLAGS = $(OFLAG) $(GFLAG) $(DEFINES) -I$(MARSDIR)/include $(INCDIRS) EXPORT = CC="$(CC)" CO="$(CO)" DEFINES="$(DEFINES)" \ CFLAGS="$(CFLAGS)" EXMARSDIR="$(MARSDIR)" mars: $(OBJS) libs @ cd sim; make stat $(EXPORT) $(CC) $(GFLAG) -o mars $(OBJS) sim/stat.o $(MARSLIBS) -lm install: depend mars cp $(MARSDIR)/mars $(PREFIX)/bin libs: @ cd $(MARSDIR)/sim; make lib $(EXPORT) @ cd $(MARSDIR)/comps; make lib $(EXPORT) tags: etags -t `find . -name \*.[hc]` clean: @ cd $(MARSDIR)/XMotif; make clean $(EXPORT) @ cd $(MARSDIR)/X; make clean $(EXPORT) @ cd $(MARSDIR)/sim; make clean $(EXPORT) @ cd $(MARSDIR)/comps; make clean $(EXPORT) @ cd $(MARSDIR)/include; make clean $(EXPORT) @ cd $(MARSDIR)/lib; rm -f *.o *~ Makefile.bak *.a rm -f mars *.o *~ Makefile.bak *.a space: @ cd $(MARSDIR)/X; make space $(EXPORT) @ cd $(MARSDIR)/XMotif; make space $(EXPORT) @ cd $(MARSDIR)/sim; make space $(EXPORT) @ cd $(MARSDIR)/comps; make space $(EXPORT) @ cd $(MARSDIR)/include; make space $(EXPORT) rm -f *.o *~ Makefile.bak cd $(MARSDIR)/lib; rm -f *.o *~ Makefile.bak # The echofoo lines are here so that I can do things like copy # all the X source files somewhere: # cp `make echox` some_other_directory $(EXPORT) echox: @ cd $(MARSDIR)/X; make echo $(EXPORT) echoxmotif: @ cd $(MARSDIR)/XMotif; make echo $(EXPORT) echosim: @ cd $(MARSDIR)/sim; make echo $(EXPORT) echocomps: @ cd $(MARSDIR)/comps; make echo $(EXPORT) echomisc: @ echo $(MISCFILES) echo: @ echo ${MISCFILES} @ cd $(MARSDIR)/X; make echo $(EXPORT) @ cd $(MARSDIR)/XMotif; make echo $(EXPORT) @ cd $(MARSDIR)/sim; make echo $(EXPORT) @ cd $(MARSDIR)/comps; make echo $(EXPORT) # Check out all the files revised from RCS (unlocked) co: @ cd $(MARSDIR)/sim; make co $(EXPORT) @ cd $(MARSDIR)/comps; make co $(EXPORT) @ cd $(MARSDIR)/include; make co $(EXPORT) depend: echo "" > include/stat.h @ cd $(MARSDIR)/sim; make depend $(EXPORT) @ cd $(MARSDIR)/comps; make depend $(EXPORT) lint: @ cd $(MARSDIR)/sim; make lint $(EXPORT) @ cd $(MARSDIR)/comps; make lint $(EXPORT)