11 SRCS = client.c curses.c board.c util.c inet.c
12 SSRCS = server.c util.c
15 SOBJS = $(SSRCS:.c=.o)
17 DISTFILES = README FAQ INSTALL COPYING TODO CHANGES \
18 configure Makefile netris.h \
21 all: config.h $(PROG) $(SPROG)
23 msg.h: msg.en.h $(MSG_FILE)
24 @echo "Linking $(MSG_FILE) to msg.h"
25 @echo '// WARNING! This is a generated file. Do NOT edit.' > msg.h
26 @echo '// See msg.*.h for the editable files.' >> msg.h
27 @echo '#include "$(MSG_FILE)"' >> msg.h
29 ifneq ($(MSG_FILE),msg.en.h)
30 @echo "Adding untranslated messages to msg.h"
31 @echo '// untranslated messages from the English master file:' >> msg.h
32 @./msg_diff.sh $(MSG_FILE) < msg.en.h >> msg.h
35 $(PROG): msg.h $(OBJS)
36 $(CC) -o $(PROG) $(OBJS) $(LFLAGS) $(CFLAGS)
38 $(SPROG): msg.h $(SOBJS)
39 $(CC) -o $(SPROG) $(SOBJS) $(LFLAGS) $(CFLAGS)
45 @echo "Makefile and/or config.h is out of date"
46 @echo "Run ./configure now"
50 @dir="netris-$(VERSION)"; \
51 echo "Creating $$dir directory"; \
54 cp $(DISTFILES) $$dir; \
57 chmod 755 $$dir/configure; \
58 echo "Creating $$dir.tar.gz"; \
59 tar -cvzof $$dir.tar.gz $$dir
62 rm -f $(PROG) $(OBJS) $(SPROG) $(SOBJS) msg.h a.out
65 rm -f config.mak config.h