1SHELL = /bin/sh 2 3EXECS = scsimain 4 5LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 6 7CFLAGS = -g -O2 -Wall -D_REENTRANT $(LARGE_FILE_FLAGS) 8# CFLAGS = -g -O2 -Wall -D_REENTRANT -DSG_KERNEL_INCLUDES $(LARGE_FILE_FLAGS) 9# CFLAGS = -g -O2 -Wall -pedantic -D_REENTRANT $(LARGE_FILE_FLAGS) 10 11LDFLAGS = 12 13all: $(EXECS) 14 15depend dep: 16 @set -e; for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ 17 done > .depend 18 19clean: 20 /bin/rm -f *.o $(EXECS) core .depend 21 22scsimain: scsimain.o sg_err.o llseek.o 23 $(LD) -o $@ $(LDFLAGS) $^ -lpthread 24 25install: $(EXECS) 26 install -d $(INSTDIR) 27 @set -e; for name in $^; \ 28 do install -s -o root -g root -m 755 $$name $(INSTDIR); \ 29 done 30 install -d $(MANDIR)/$(MAN_PREF) 31 @set -e; for mp in $(MAN_PGS); \ 32 do install -o root -g root -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ 33 gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ 34 done 35 36uninstall: 37 dists="$(EXECS)"; \ 38 @set -e; for name in $$dists; do \ 39 rm -f $(INSTDIR)/$$name; \ 40 done 41 @set -e; for mp in $(MAN_PGS); do \ 42 rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ 43 done 44 45ifeq (.depend,$(wildcard .depend)) 46include .depend 47endif 48