1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
# IMWheel Makefile
# best used with gmake!
VERSION=0.9.6
.PHONY: jax getopt
CC=gcc
ifeq ("$(shell uname -s)","Linux")
INCDIRS=-I/usr/X11R6/include -Ijax
LIBDIRS=-L/usr/X11R6/lib
SUBDIRLIBS=jax/libjax.a
SUBDIRS=jax
LIBS=-lX11 -lXext -lXtst
ifeq ("$(shell ls -d gpm-imwheel)","gpm-imwheel")
GPM=gpm
endif
else
SHELL=`which bash`
INCDIRS=-I/usr/X11R6/include -Ijax -Igetopt
LIBDIRS=-L/usr/X11R6/lib
SUBDIRLIBS=jax/libjax.a getopt/libgetopt.a
SUBDIRS=jax getopt
LIBS=-lX11 -lXext -lXtst
GPM=
endif
#FLAGS=-g -DDEBUG -Wall
#FLAGS=-g -pg
FLAGS=-O6 -s -Wall
INSTALLDIR=$(DESTDIR)/usr/bin
# No spaces are allowd before or after the PIDDIR directory
#PIDDIR=/var/run#NOTE : this is great for root users... but regular users
# have no access here which is when the program needs to be
# setuid root... only do this if you are prepared to have
# another setuid root program in your install base.
PIDDIR=/tmp#NOTE : This has been voted by a large majority to be the best
# place for this file. for the good of all users.
CFLAGS=$(FLAGS) $(INCDIRS) -DPIDDIR="\"$(PIDDIR)\"" -DVERSION="\"$(VERSION)\""
LDFLAGS=$(FLAGS) $(LIBDIRS) $(LIBS)
SHELL=/bin/sh
PROGS= imwheel $(GPM) mdump setimps2 getmdt setmmplus setps2
all: $(SUBDIRS) $(PROGS)
gpm-imwheel/Makefile:
cd gpm-imwheel ; ./configure
gpm: gpm-imwheel/Makefile
@make -C gpm-imwheel
imwheel: imwheel.o util.o cfg.o $(SUBDIRLIBS)
jax:
@make -C jax
getopt:
@make -C getopt
imwheel.o: imwheel.c util.h
new: clean all
texts:
set -x ; for f in README BUGS CHANGES COPYING ; do cp $$f $$f.tmp ; expand -t4 $$f.tmp > $$f ; rm $$f.tmp ; done ; set +x
tgz: nuke texts full-tgz nogpm-tgz
full-tgz:
FNAME=`basename $$PWD` ; tar -zcvf ../$$FNAME.tar.gz -C .. $$FNAME
nogpm-tgz:
FNAME=`basename $$PWD` ; tar -zcvf ../$$FNAME.nogpm.tar.gz -C .. $$FNAME --exclude='imwheel/gpm-*'
clean:
rm -f *.o
nuke: clean
rm -f $(PROGS)
-make -C jax nuke
-make -C getopt nuke
ifeq ("$(GPM)", "gpm")
-make -C gpm-imwheel/docs distclean
-make -C gpm-imwheel distclean
endif
ifeq ("$(GPM)", "gpm")
install: install-gpm install-imwheel
install-gpm: $(GPM)
@make -C gpm-imwheel install
else
install: install-imwheel
endif
install-imwheel: imwheel
install -m 755 -d $(INSTALLDIR)
install -m 755 -s imwheel $(INSTALLDIR)
install -m 755 -d $(DESTDIR)/etc/X11/imwheel
install -m 644 -o root imwheelrc $(DESTDIR)/etc/X11/imwheel/imwheelrc
install -m 755 -d $(DESTDIR)/usr/share/man/man1
install -m 644 imwheel.1 $(DESTDIR)/usr/share/man/man1/imwheel.1
mdump: mdump.c
$(CC) -O6 $^ -o $@
setimps2: setimps2.c
$(CC) -O6 $^ -o $@
setmmplus: setmmplus.c
$(CC) -O6 $^ -o $@
getmdt: getmdt.c
$(CC) -O6 $^ -o $@
|