####################################################################### # # setuid xjumpx default Makefile. # # xjumpx mode is 4755, owner is games # scorefile directory mode is 755, owner is games # xjumpx create scorefile with games user permission # so, users cannot access it. # ######################################################################## ## X11 base directory X11BASE = /usr/X11R6 ## directory for record files RECORD_DIR = $(X11BASE)/lib/X11/xjumpx ## file name ## don't use /[0-9]+(\.dat|\.swap|\.lock)?/ (regular exp) ## these name are used for personal record file. ## filename of record file (it is built in binary) RECORD_FILE = $(RECORD_DIR)/record.dat ## filename of swap record file (it is built in binary) SWAP_FILE = $(RECORD_DIR)/record.swap ## filename of lock file (it is built in binary) LOCK_FILE = $(RECORD_DIR)/record.lock ## number of record entry (it is built in binary) RECORD_ENTRY = 10 RECORD_ENTRY_PRIVATE = 10 ## install target name TARGET = $(X11BASE)/bin/xjumpx ## manual directory MANDIR = $(X11BASE)/man/man1 # app-defaults APP_DEFAULTS = $(X11BASE)/lib/X11/app-defaults ######################################################## ## C compiler CC = gcc ## additional include file directory IDIR = -I$(X11BASE)/include ## addtitional library directory LDIR = -L$(X11BASE)/lib ## flag to compiler CFLAG = -O ## flag to linker LFLAG = ########################################################## ########################################################## ########################################################### OBJS = main.o game.o hero.o floor.o misc.o record.o resource.o key.o CFLAGS = \ -DRECORD_DIR=\"$(RECORD_DIR)\" \ -DRECORD_FILE=\"$(RECORD_FILE)\" \ -DSWAP_FILE=\"$(SWAP_FILE)\" \ -DLOCK_FILE=\"$(LOCK_FILE)\" \ -DRECORD_ENTRY=$(RECORD_ENTRY) \ -DRECORD_ENTRY_PRIVATE=$(RECORD_ENTRY_PRIVATE) \ -DSETUID .c.o: $(CC) -c $(CFLAGS) $(COPT) $(IDIR) $< all : xjumpx xjumpx : $(OBJS) $(CC) -o xjumpx \ $(OBJS) \ -lXaw -lXmu -lXt -lXpm -lXext -lX11 $(LDIR) install : xjumpx install -c -s -o games -m 4755 xjumpx $(TARGET) install -d -o games $(RECORD_DIR) cp xjumpx.1 $(MANDIR) && gzip -f $(MANDIR)/xjumpx.1 cp XJumpX.ad $(APP_DEFAULTS)/XJumpX clean: rm -rf xjumpx *.o floor.c : xjump.h xjump_xlib.h game.c : xjump.h key.h hero.c xjump.h : xjump_xlib.h key.h key.c : key.h main.c : key.h xjump.h xjump_xlib.h record.h \ picture.xpm title.xpm icon.xbm icon_msk.xbm Makefile record.c: record.h Makefile