⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 一个网络和单机的麻将游戏源码
💻
字号:
# $Header: /home/jcb/newmj/RCS/Makefile.in,v 11.14 2003/10/12 21:10:48 jcb Exp $# Master makefile for the xmj suite.### NOTE NOTE NOTE### This makefile uses some features specific to GNU make.### If you do not have GNU make, you will need to adjust it.### In particular, example Windows specific settings are included here### by means of    ifdef Win32   conditionals (where Win32 is a Makefile### variable that can be set on the command line, for example).### It should be easy to edit these out.### As far as I know, the only other non-portable feature is the### use of %-pattern rules, but they occur in many makes.# The things you are most likely to change come first!# first target: don't change!all::### Local configuration options. Read and edit as necessary.# This is not available in current public releases.# Uncomment the following line to build the table manager.# TableManager=1# The directory in which to find the tile pixmaps that are# compiled into the program. Beware of licensing considerations.# (The tiles-v1 pixmaps may only be linked into GPLed programs.)FALLBACKTILES=./tiles-v1# The directory in which to find tile pixmaps.# Defaults to NULL, causing the compiled-in tiles to be used.TILESET=NULL# The search path for finding tile pixmap directories.# Defaults to NULL, meaning current directory.TILESETPATH=NULL# Where to install the programs.# (Don't bother with this on Windows; I don't have an install target# for Windows.)# The binaries go into  $(DESTDIR)$(BINDIR)DESTDIR = /usr/local/BINDIR = bin# The man pages go into $(DESTDIR)$(MANDIR)MANDIR = man/man1# and the appropriate suffix is 1MANSUFFIX = 1### End of local configuration.### System dependent settings.# This section contains compiler settings etc.# If you think this reminds of you something, you're right: this# makefile was made by stripping out most of an imake-generated file.# It's best to use gcc if you can.CC = gcc# C debugging and optimization flags. # In development, we turn on all reasonable warnings, thus:# CDEBUGFLAGS = -g -Wall -W -Wstrict-prototypes -Wmissing-prototypes# However, in the production releases, we don't because other people's# code (e.g. glib) may provoke warnings.# Also, we do NOT enable optimization by default, because RedHat 6# Linux distributions have a seriously buggy C compiler.CDEBUGFLAGS = -g# The -Wconversion flag is also useful to detect (more than usual)# abuse of enums, but it generates many superfluous warnings, so# is not on by default.# To check for non-ANSI usages, use -ansi; # to get all the ANSI-mandated warnings, use -pedantic, but # this is so pedantic it's not worth it.# Defines for the compilation.ifdef Win32# This doesn't work if one tries to set these. Does anybody know# how to get a double quote through DOS or whatever to gcc ?DEFINES = -DTILESET=$(TILESET) -DTILESETPATH=$(TILESETPATH) -DWIN32=1elseDEFINES = -DTILESET='$(TILESET)' -DTILESETPATH='$(TILESETPATH)'endif# Options for compiling.ifdef Win32# I assume you're using mingw. If you're using cygwin, you also# need -fno-cygwin.CCOPTIONS = -fnative-structendif# Extra libraries needed above whatever the system provides you with.# Things like -lnsl on Solaris are the most likely examples.ifdef Win32# We need the winsock librariesLDLIBS = -LC:/winnt/system32 -lwsock32else# Red Hat and Mandrake (and probably most other) Linux systems# need nothing, as any needed libraries are brought in for gtk anyway.LDLIBS =# If you are on Solaris, you may need the following:# LDLIBS = -lsocket -lnsl# If you are on HP-UX, you may need# LDLIBS = -lmendif# The xmj program is built with gtk+, so it needs to know where the# libraries and headers are.ifdef Win32# You'll need to say explicitly where they are, as here:EXTRA_INCLUDES=-IC:/gtk/glib -IC:/gtk# We also add the flag that makes xmj.exe be a GUI programGUILIBS=-LC:/gtk -lgtk-1.3 -lgdk-1.3 -lglib-1.3 -lgmodule-1.3 -Wl,-subsystem,windowselse# Not Windows. If gtk+ is properly installed, this is all that's needed.EXTRA_INCLUDES=`gtk-config --cflags`GUILIBS=`gtk-config --libs`endif# We use gcc to link as wellCCLINK = $(CC)# don't mess with theseALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES)ALLDEFINES = $(ALLINCLUDES) $(EXTRA_DEFINES) $(DEFINES)CFLAGS = $(EXTRA_CFLAGS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS)# various auxiliary program and settings.ifndef Win32# GNU make, we hopeMAKE = makeCP = cp -fRM = rm -f# makedep is a gcc-based makedepend that doesn't look at the # standard files.DEPEND = ./makedepDEPENDFLAGS =# perl is needed for generating several filesPERL = perl# suffix of executablesEXE = # programs used in installationMKDIRHIER = mkdir -pINSTALL = installINSTALLFLAGS = -cINSTPGMFLAGS = -sINSTMANFLAGS = -m 0444else# Windows# GNU make, we hopeMAKE = makeCP = xcopyRM = rm /f# we don't have a makedepend on windows ...DEPEND =DEPENDFLAGS =# perl is needed for generating several filesPERL = perl# suffix of executablesEXE = .exe# programs used in installation: not in windowsMKDIRHIER = INSTALL = INSTALLFLAGS = INSTPGMFLAGS = INSTMANFLAGS = endif### There should be no need to edit after this point,### unless you're using a non-GNU make.all:: MakefileMakefile: Makefile.in	$(RM) $@	$(CP) $< $@	make depend# Autogenerated files to do with the table managerifdef TableManager TMAUTOGENS = enc_mcmsg.c enc_mpmsg.c dec_mcmsg.c dec_mpmsg.c mcmsg_union.h mcmsg_size.c mpmsg_union.h mpmsg_size.c mprotocol-enums.c mprotocol-enums.helse TMAUTOGENS = endif# This variable lists all the auto-generated program files.AUTOGENS = enc_cmsg.c enc_pmsg.c dec_cmsg.c dec_pmsg.c cmsg_union.h cmsg_size.c pmsg_union.h pmsg_size.c  game-enums.c game-enums.h player-enums.c player-enums.h protocol-enums.c protocol-enums.h  tiles-enums.c tiles-enums.h fbtiles.c version.h $(TMAUTOGENS)# This is a trick to make the auto-generated files be created# by make depend, if they're not already there. Otherwise the# make depend won't put them in the dependencies.depend:: $(AUTOGENS)	echo Remade some auto-generated files# The programsifdef TableManager PROGRAMS = xmj$(EXE) mj-server$(EXE) mj-player$(EXE) mj-manager$(EXE)else PROGRAMS = xmj$(EXE) mj-server$(EXE) mj-player$(EXE)endifall:: $(PROGRAMS)# The controller target. Requires player, tiles, protocol, sysdepSRCS1 = controller.c player.c tiles.c protocol.c game.c scoring.c sysdep.cOBJS1 = controller.o player.o tiles.o protocol.o game.o scoring.o sysdep.o OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4)mj-server$(EXE): $(OBJS1)	$(RM) $@	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS1)  $(LDLIBS)  $(EXTRA_LOAD_FLAGS)ifndef Win32install:: mj-server$(EXE)	@if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS)  mj-server$(EXE) $(DESTDIR)$(BINDIR)/mj-serverinstall.man:: mj-server.man	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) mj-server.man $(DESTDIR)$(MANDIR)/mj-server.$(MANSUFFIX)endif # Win32ifdef TableManager# The table manager. Requires mprotocol and sysdepSRCS4 = manager.c mprotocol.c sysdep.cOBJS4 = manager.o mprotocol.o sysdep.omj-manager$(EXE): $(OBJS4)	$(RM) $@	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS4)  $(LDLIBS)  $(EXTRA_LOAD_FLAGS)ifndef Win32install:: mj-manager$(EXE)	@if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS)  mj-manager$(EXE) $(DESTDIR)$(BINDIR)/mj-managerinstall.man:: mj-manager.man	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) mj-manager.man $(DESTDIR)$(MANDIR)/mj-manager.$(MANSUFFIX)endif # Win32endif # TableManager# the greedy playerSRCS2 = greedy.c client.c player.c tiles.c protocol.c game.c sysdep.cOBJS2 = greedy.o client.o player.o tiles.o protocol.o game.o sysdep.omj-player$(EXE): $(OBJS2) $(DEPLIBS2)	$(RM) $@	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS2)  $(LDLIBS)  $(EXTRA_LOAD_FLAGS)ifndef Win32install:: mj-player$(EXE)	@if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS)  mj-player$(EXE) $(DESTDIR)$(BINDIR)/mj-playerinstall.man:: mj-player.man	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) mj-player.man $(DESTDIR)$(MANDIR)/mj-player.$(MANSUFFIX)endif # Win32# the guiifdef Win32# the icon resource file and objectICONOBJ = iconres.oiconres.o: iconres.rs icon.ico	windres iconres.rs iconres.oelseICONOBJ =endifSRCS3 = gui.c gui-dial.c lazyfixed.c vlazyfixed.c client.c player.c tiles.c fbtiles.c protocol.c game.c sysdep.cOBJS3 = gui.o gui-dial.o client.o lazyfixed.o vlazyfixed.o player.o tiles.o fbtiles.o protocol.o game.o sysdep.o $(ICONOBJ)xmj$(EXE): $(OBJS3) $(DEPLIBS3)	$(RM) $@	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS3) $(GUILIBS) $(LDLIBS)  $(EXTRA_LOAD_FLAGS)install:: xmj$(EXE)	@if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS)  xmj$(EXE) $(DESTDIR)$(BINDIR)/xmjinstall.man:: xmj.man	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi	$(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xmj.man $(DESTDIR)$(MANDIR)/xmj.$(MANSUFFIX)# version.h is now made from version.h.in by the release script.# so if we are not making a release, we'd better provide it if# it isn't there.version.h:	cp version.h.in $@	chmod u+w $@# rule to generate the fallback tilesfbtiles.c: $(FALLBACKTILES) makefallbacktiles Makefile	$(PERL) makefallbacktiles $(FALLBACKTILES) >fbtiles.c# Rules for the auto generated filesenc_cmsg.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -cmsgenc_pmsg.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -pmsgdec_cmsg.c: protocol.h proto-decode-msg.pl	$(PERL) proto-decode-msg.pl -cmsgdec_pmsg.c: protocol.h proto-decode-msg.pl	$(PERL) proto-decode-msg.pl -pmsg# rules for the other auxiliary files# the commands will be executed twice, but never mind.cmsg_union.h cmsg_size.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -cmsgpmsg_union.h pmsg_size.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -pmsgenc_mcmsg.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -mcmsgenc_mpmsg.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -mpmsgdec_mcmsg.c: protocol.h proto-decode-msg.pl	$(PERL) proto-decode-msg.pl -mcmsgdec_mpmsg.c: protocol.h proto-decode-msg.pl	$(PERL) proto-decode-msg.pl -mpmsg# rules for the other auxiliary files# the commands will be executed twice, but never mind.mcmsg_union.h mcmsg_size.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -mcmsgmpmsg_union.h mpmsg_size.c: protocol.h proto-encode-msg.pl	$(PERL) proto-encode-msg.pl -mpmsg# Rule for the enum parsing files:%-enums.h: %.h make-enums.pl	$(PERL) make-enums.pl $<%-enums.c: %.h make-enums.pl	$(PERL) make-enums.pl $<# distclean also removes the auto-generated files and the Makefiledistclean:: clean	$(RM) Makefile $(AUTOGENS)# used to build a source releasetextdocs:: use.txt rules.txtuse.txt rules.txt: xmj.man	$(RM) use.txt rules.txt	$(PERL) maketxt xmj.man	chmod 444 use.txt rules.txtdepend::	$(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)clean::	$(RM) $(PROGRAMS)clean::	$(RM) *.o core errs *~# DO NOT DELETEcontroller.o: controller.c controller.h tiles.h player.h player-enums.h \  protocol.h cmsg_union.h pmsg_union.h protocol-enums.h game.h \  game-enums.h scoring.h sysdep.h version.hplayer.o: player.c player.h tiles.h player-enums.h sysdep.h \  player-enums.ctiles.o: tiles.c tiles.h protocol.h player.h player-enums.h cmsg_union.h \  pmsg_union.h protocol-enums.h sysdep.hprotocol.o: protocol.c protocol.h tiles.h player.h player-enums.h \  cmsg_union.h pmsg_union.h protocol-enums.h sysdep.h enc_cmsg.c \  dec_cmsg.c enc_pmsg.c dec_pmsg.c cmsg_size.c pmsg_size.c \  protocol-enums.cgame.o: game.c game.h tiles.h player.h player-enums.h protocol.h \  cmsg_union.h pmsg_union.h protocol-enums.h game-enums.h sysdep.h \  game-enums.cscoring.o: scoring.c tiles.h player.h player-enums.h controller.h \  protocol.h cmsg_union.h pmsg_union.h protocol-enums.h game.h \  game-enums.h scoring.h sysdep.hsysdep.o: sysdep.c sysdep.hgreedy.o: greedy.c client.h game.h tiles.h player.h player-enums.h \  protocol.h cmsg_union.h pmsg_union.h protocol-enums.h game-enums.h \  sysdep.h version.hclient.o: client.c sysdep.h client.h game.h tiles.h player.h \  player-enums.h protocol.h cmsg_union.h pmsg_union.h protocol-enums.h \  game-enums.hplayer.o: player.c player.h tiles.h player-enums.h sysdep.h \  player-enums.ctiles.o: tiles.c tiles.h protocol.h player.h player-enums.h cmsg_union.h \  pmsg_union.h protocol-enums.h sysdep.hprotocol.o: protocol.c protocol.h tiles.h player.h player-enums.h \  cmsg_union.h pmsg_union.h protocol-enums.h sysdep.h enc_cmsg.c \  dec_cmsg.c enc_pmsg.c dec_pmsg.c cmsg_size.c pmsg_size.c \  protocol-enums.cgame.o: game.c game.h tiles.h player.h player-enums.h protocol.h \  cmsg_union.h pmsg_union.h protocol-enums.h game-enums.h sysdep.h \  game-enums.csysdep.o: sysdep.c sysdep.hgui.o: gui.c gui.h lazyfixed.h sysdep.h vlazyfixed.h client.h game.h \  tiles.h player.h player-enums.h protocol.h cmsg_union.h pmsg_union.h \  protocol-enums.h game-enums.h version.hgui-dial.o: gui-dial.c gui.h lazyfixed.h sysdep.h vlazyfixed.h client.h \  game.h tiles.h player.h player-enums.h protocol.h cmsg_union.h \  pmsg_union.h protocol-enums.h game-enums.h version.hlazyfixed.o: lazyfixed.c lazyfixed.h sysdep.hvlazyfixed.o: vlazyfixed.c vlazyfixed.h sysdep.hclient.o: client.c sysdep.h client.h game.h tiles.h player.h \  player-enums.h protocol.h cmsg_union.h pmsg_union.h protocol-enums.h \  game-enums.hplayer.o: player.c player.h tiles.h player-enums.h sysdep.h \  player-enums.ctiles.o: tiles.c tiles.h protocol.h player.h player-enums.h cmsg_union.h \  pmsg_union.h protocol-enums.h sysdep.hfbtiles.o: fbtiles.cprotocol.o: protocol.c protocol.h tiles.h player.h player-enums.h \  cmsg_union.h pmsg_union.h protocol-enums.h sysdep.h enc_cmsg.c \  dec_cmsg.c enc_pmsg.c dec_pmsg.c cmsg_size.c pmsg_size.c \  protocol-enums.cgame.o: game.c game.h tiles.h player.h player-enums.h protocol.h \  cmsg_union.h pmsg_union.h protocol-enums.h game-enums.h sysdep.h \  game-enums.csysdep.o: sysdep.c sysdep.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -