chiark / gitweb /
Do away with incomprehensible LC_CTYPE adjustment in vtwmrc
[ian-dotfiles.git] / autotitle / Makefile
index 028636a6c0ef6994947613d1a7db13c1b3992303..d03ce5aba21fff9a861e96c24e64632f65368c2e 100644 (file)
@@ -1,21 +1,23 @@
-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