1# makefile for ICBM3D v.0.4 2 3# by Bill Kendrick 4# nbs@sonic.net 5# http://www.sonic.net/~nbs/unix/x/icbm3d/ 6 7# February 28, 1998 - July 29, 1998 8 9 10# Makefile user-definable variables------------------------------------------ 11 12CC?=${CC} 13PREFIX?=${PREFIX} 14LOCALBASE?=${PREFIX} 15MATHLIB=-lm 16 17INSTALLROOT=$(PREFIX) 18LANGUAGE=english 19 20XLIB=-L$(LOCALBASE)/lib -lX11 #-lcompat 21CFLAGS+=-I$(LOCALBASE)/include 22 23 24# End of makefile user-definable variables----------------------------------- 25 26 27 28# Makefile commands: 29 30all: icbm3d 31 chmod 644 *.c *.h makefile *.txt 32 @echo "Moving 'icbm3d' to $(INSTALLROOT)" 33 - cp icbm3d $(INSTALLROOT)/icbm3d 34 35clean: 36 - rm *.o icbm3d language.h 37 38 39OBJECTS=icbm3d.o window.o connect.o hints.o visual.o gc.o color.o randnum.o \ 40 text.o 41 42# Applications: 43 44icbm3d: $(OBJECTS) 45 $(CC) $(OBJECTS) $(XLIB) $(MATHLIB) $(CFLAGS) -o icbm3d 46 chmod 755 icbm3d 47 48 49#dependencies 50 51icbm3d.o: icbm3d.c window.h connect.h hints.h visual.h gc.h color.h \ 52 randnum.h text.h keydefs.h language.h 53 $(CC) $(CFLAGS) icbm3d.c -c 54 55 56# Library objects: 57 58window.o: window.c window.h 59 60connect.o: connect.c connect.h 61 62hints.o: hints.c hints.h 63 64visual.o: visual.c visual.h 65 66gc.o: gc.c gc.h 67 68color.o: color.c color.h 69 70randnum.o: randnum.c randnum.h 71 72text.o: text.c text.h 73 74language.h: lang_$(LANGUAGE).h 75 @echo "Using $(LANGUAGE) for messages..." 76 - rm language.h 77 @echo "/* *** DO NOT EDIT THIS FILE! *** */" > language.h 78 @echo "/* Instead, edit: lang_$(LANGUAGE).h and rebuild with: */" \ 79 >> language.h 80 @echo "/* 'make clean ; make ... LANGUAGE=$(LANGUAGE) ...' */" \ 81 >> language.h 82 @echo >> language.h 83 cat lang_$(LANGUAGE).h >> language.h 84