-XLIB= -L/usr/local/X11R5/lib -lX11
+INSTALLDIR= $(HOME)/personal/linux-i386/bin
+INSTALLED= $(INSTALLDIR)/autotitle
+X11= /usr/X11R6
-installed= $(HOME)/bin/$(ARCH)/autotitle
+CC= gcc
+CPPFLAGS= $(OPTIONS) -I$(X11)/include
+CFLAGS= $(OPTIMISE)
+OPTIMISE= -O2
+OPTIONS= -DNOXTERM
+XLIB= -L$(X11)/lib -lX11
-default: autotitle$(ARCH)
+default: autotitle
-install: $(installed)
+install: $(INSTALLED)
-$(installed): autotitle$(ARCH)
- strip autotitle$(ARCH)
- rm -f $(HOME)/bin/$(ARCH)/autotitle
- ln `pwd`/autotitle$(ARCH) $(HOME)/bin/$(ARCH)/autotitle
+$(INSTALLED): autotitle
+ install -d $(INSTALLDIR)
+ rm -f $@
+ ln autotitle $@
-autotitlesun4: autotitle.c Makefile
- gcc -traditional -O -o autotitlesun4 autotitle.c $(XLIB) -DNOXTERM
-
-autotitlesun3: autotitle.c Makefile
- gcc -traditional -O -o autotitlesun3 autotitle.c $(XLIB) -DNOXTERM
-
-autotitlemips: autotitle.c Makefile
- cc -O -o autotitlemips autotitle.c $(XLIB) -DNOXTERM
+autotitle: autotitle.c Makefile
+ $(CC) $(CFLAGS) $(CPPFLAGS) autotitle.c -o $@ $(XLIB)
+ strip autotitle