Makefile.MudOS.master

tmi2/v21.7a10/Makefile.MudOS.master · 2.2 KB

From the archive tmi2_mudos_v1.tar.gz

Download the archive   « Back to the archive contents

#####################################################
#       Standard Makefile for the MudOS driver      #
#####################################################

SHELL=/bin/sh
MAKEOVERRIDES=$(OVERRIDES)

%include "system_libs"
 
# NeXT: link with MallocDebug if you have a NeXT with NeXTOS 2.1 or later and
# you wish to search for memory leaks (see /NextDeveloper/Apps/MallocDebug).
# Note: linking with MallocDebug will cause the virtual size of the
# driver process to reach appoximately 40MB however the amount of real memory
# used will remain close to normal.
#EXTRALIBS=-lMallocDebug -lsys_s

#################################################
# the meat of things                            #
# don't change anything below this section      #
#################################################

OURLIBS=packages/packages.a mudlib/mudlib.a

all: $(DRIVER_BIN) addr_server

%ifdef GNU
$(OBJDIR)/%.o: %.c
	$(CC) -I$(OBJDIR) $(CFLAGS) -o $@ -c $<

$(OBJDIR)/interpret.o: interpret.c patchlevel.h

$(OBJDIR)/lex.o: lex.c preprocess.c cc.h grammar.tab.c

$(OBJDIR)/grammar.tab.o: grammar.tab.c opcodes.h

%else
.c.o:
	$(CC) $(CFLAGS) -c $*.c

interpret.o: interpret.c patchlevel.h

lex.o: lex.c preprocess.c cc.h grammar.tab.c

grammar.tab.o: grammar.tab.c opcodes.h

%endif

grammar.tab.c: grammar.y
	$(YACC) grammar.y
	-rm -f grammar.tab.*
	sed "s/y.tab.c/grammar.tab.c/g" y.tab.c  > grammar.tab.c
	-mv y.tab.h grammar.tab.h

# For Sequent DYNIX/ptx compile $(OBJ) is parallel:
# $(DRIVER_BIN):& $(OBJ)
%ifdef GNU
$(DRIVER_BIN): $(OBJ)
	$(MAKE) -C packages 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OBJDIR=../$(OBJDIR)'
	$(MAKE) -C mudlib 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OBJDIR=../$(OBJDIR)'
%else
$(DRIVER_BIN): $(OBJ)
	(cd packages; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)')
	(cd mudlib; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)')
%endif
	-mv -f $(DRIVER_BIN) $(DRIVER_BIN).old
	$(PROOF) $(CC) $(CFLAGS) $(OBJ) -o $(DRIVER_BIN) $(OURLIBS) $(LIBS)

%ifdef GNU
addr_server:  $(OBJDIR)/addr_server.o $(OBJDIR)/socket_ctrl.o $(OBJDIR)/port.o addr_server.h
	$(CC) $(CFLAGS) $(OBJDIR)/socket_ctrl.o $(OBJDIR)/addr_server.o $(OBJDIR)/port.o \
	-o addr_server $(LIBS)

%else
addr_server:  addr_server.o socket_ctrl.o port.o addr_server.h
	$(CC) $(CFLAGS) socket_ctrl.o addr_server.o port.o \
	-o addr_server $(LIBS)
%endif

Site Stats

Snippets: 1791
Codebases: 571