chiark / gitweb /
bugfixes
[ian-dotfiles.git] / autotitle / Makefile
index 028636a6c0ef6994947613d1a7db13c1b3992303..209d7a7afed93c9f37e0a300a69837bf75f512f1 100644 (file)
@@ -1,21 +1,21 @@
-XLIB= -L/usr/local/X11R5/lib -lX11
+INSTALLDIR=    $(HOME)/bin
+INSTALLED=     $(INSTALLDIR)/autotitle
+X11=           /usr/X11R6
 
-installed= $(HOME)/bin/$(ARCH)/autotitle
+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
+               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