Makefile.sanity.gz
snippets · 1.3 KB · 2010-03-30
Makefile for TinyMUCK (sanity release) listing compiler options for several systems.
Download « Back to the snippets list
#!/bin/make -f
# Makefile for tinymuck
#
# Whatever compiler you user, it **MUST** be able to grok ANSI C.
# Generic systems using GCC:
#
CC= gcc
CCFLAGS= -g -pipe -W -Wreturn-type -Wunused -Wcomment
# IBM RT C compiler:
#
# CC= cc
# CCFLAGS=-g
# Dec 3100 C compiler and other MIPS machines
#
#CC= cc
#CCFLAGS=-g
# for RCS only
GET= co
CLEAN= rcsclean
MV= -mv -f
RM= -rm -f
ROOT= ..
MAKE= make
LINT= lint
MKTAGS= ctags
MKDEPEND= makedepend
INCLUDE= ${ROOT}/include
SRC_PREFIX=
DEFS=
CFLAGS= ${CCFLAGS} ${DEFS} -I${INCLUDE}
# Destination for binaries
DEST=${ROOT}/game
##########################################################################
# You should not have to change anything below here #
##########################################################################
MISCSRC= Makefile ChangeLog COPYING
CSRC= boolexp.c case.c compile.c compress.c create.c db.c disassem.c edit.c \
interface.c game.c hashtab.c help.c inst.c interp.c log.c look.c \
match.c move.c player.c predicates.c property.c rob.c set.c speech.c \
stringutil.c unparse.c utils.c wiz.c clilib.c p_conversions.c \
p_interaction.c p_logic.c p_operands.c p_create.c p_objects.c \
p_property.c p_stack.c p_strings.c p_tests.c p_time.c p_descriptor.c \
p_for.c dbreflist.c database.c wild.c mush.c howard.c \
regexp.c
LSRC= copyright.c
MSRC= decompress.c sanity.c
SRC= ${MISCSRC} ${CSRC} ${LSRC} ${MSRC}
COBJ= boolexp.o case.o compile.o compress.o create.o db.o disassem.o edit.o \
interface.o game.o hashtab.o help.o inst.o interp.o log.o look.o \
match.o move.o player.o predicates.o property.o rob.o set.o speech.o \
stringutil.o unparse.o utils.o wiz.o clilib.o p_conversions.o \
p_interaction.o p_logic.o p_operands.o p_create.o p_objects.o \
p_property.o p_stack.o p_strings.o p_tests.o p_time.o p_descriptor.o \
p_for.o dbreflist.o database.o wild.o mush.o howard.o \
regexp.o
LOBJ= copyright.o
MOBJ= decompress.o sanity.o
LIBS= -lm
OBJ= ${COBJ} ${LOBJ} ${MOBJ}
TARGETS= netmuck decompress sanity
.c.o:
${CC} ${CFLAGS} -c $*.c
netmuck: ${P} ${REGLIB} ${COBJ} ${LOBJ}
${RM} netmuck netmuck~
${CC} ${CFLAGS} -o netmuck ${COBJ} ${LOBJ} ${LIBS}
all: ${TARGETS} tags
sanity: ${P} sanity.o unparse.o utils.o db.o compress.o log.o property.o ${LOBJ}
${RM} sanity
${CC} ${CFLAGS} -o sanity sanity.o unparse.o utils.o db.o compress.o \
log.o property.o dbreflist.o stringutil.o case.o ${LOBJ} ${LIBS}
decompress: decompress.o compress.o ${LOBJ}
${RM} decompress
${CC} ${CFLAGS} -o decompress decompress.o compress.o ${LOBJ} ${LIBS}
index: index.o ${LOBJ}
${CC} ${CFLAGS} -o index index.o ${LOBJ} ${LIBS}
saber_src:
#load ${CFLAGS} ${CSRC}
saber_obj: ${CSRC} interface.o
#load ${OBJ} interface.o
tags: ${CSRC} ${MSRC}
${MKTAGS} ${CSRC} ${MSRC}
lint: ${CSRC} ${MSRC}
${LINT} ${LINTFLAGS} ${CSRC} ${MSRC}
${SRC}:
${GET} $@
sources: ${SRC}
names:
@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
depend:
${MKDEPEND} -- ${CFLAGS} -- ${CSRC} ${MSRC} ${LSRC}
echo chmod -w Makefile
chmod -w Makefile
clobber:
${RM} ${OBJ} core
${RM} ${TARGETS} tags *~ *.bak *.orig
nuke:
${RM} ${OBJ} core
${RM} ${TARGETS} tags *~ *.bak *.orig
-${CLEAN} *
-${GET} Makefile
install: all
${MV} ${TARGETS} ${DEST}
# DO NOT DELETE THIS LINE -- make depend depends on it.