1 # WARNING -- THIS HAS BEEN RE-WRITTEN TO USE GNU MAKE. DO NOT
2 # TRY TO PROCESS THIS WITH A NORMAL MAKE! (FREEBSD GUYS, THIS MEANS
3 # USE GMAKE, NOT REGULAR BSD MAKE!)
6 # linux86 freebsd86 solarissparc sgi dec vms
8 # Makefile changes by Lars Kellogg-Stedman for better integration with
11 # Version # for 'make dist'...
13 BINS = mtx tapeinfo loaderinfo scsitape
21 CPPFLAGS = @CPPFLAGS@ -DVERSION="\"$(VERSION)\""
25 INSTALL_DOC = $(INSTALL) -m 644
26 INSTALL_BIN = $(INSTALL) -m 755
27 INSTALL_DIR = $(INSTALL) -m 755 -d
30 exec_prefix = @exec_prefix@
37 ifeq ($(TARGET),linux)
39 CPPFLAGS += -I/usr/src/linux/include -DLONG_PRINT_REQUEST_SENSE=1
45 ifeq ($(TARGET),freebsd86)
47 CPPFLAGS += -I/usr/src/linux/include -DLONG_PRINT_REQUEST_SENSE=1
52 CFLAGS += -O -D_HPUX_SOURCE -D __hpux__
58 ifeq ($(TARGET),solarissparc)
78 # OpenVMS (see vms/000readme)
81 See vms/000readme for information.
87 for file in $(BINS); do \
90 $(INSTALL_DIR) $(sbindir)
91 $(INSTALL_BIN) $(BINS) $(sbindir)
92 $(INSTALL_DIR) $(mandir) $(mandir)/man1
93 $(INSTALL_DOC) mtx.1 tapeinfo.1 scsitape.1 loaderinfo.1 $(mandir)/man1
98 rm -f mam2debug mam2debug2
101 rm -f Makefile config.log config.cache config.status
104 ./makedist $(VERSION)
106 loaderinfo: loaderinfo.o mtxl.o mtxl.h mtx.h $(EXTRA)
107 $(CC) $(LDFLAGS) -o loaderinfo loaderinfo.o mtxl.o $(EXTRA) $(LIBS)
110 mtx: mtx.o mtxl.o mtxl.h mtx.h $(EXTRA)
111 $(CC) $(LDFLAGS) -o mtx mtx.o mtxl.o $(EXTRA) $(LIBS)
113 mam2debug: mtxl.o mam2debug.o mtx.h $(EXTRA)
114 $(CC) $(LDFLAGS) -o mam2debug mtxl.o mam2debug.o $(EXTRA) $(LIBS)
116 tapeinfo: tapeinfo.o mtxl.o mtx.h mtxl.h $(EXTRA)
117 $(CC) $(LDFLAGS) -o tapeinfo tapeinfo.o mtxl.o $(EXTRA) $(LIBS)
119 mam2debug2: mtxl.o mam2debug2.o mtx.h $(EXTRA)
120 $(CC) $(LDFLAGS) -o mam2debug2 mtxl.o mam2debug2.o $(EXTRA) $(LIBS)
122 scsitape: scsitape.o mtxl.o mtxl.h mtx.h $(EXTRA)
123 $(CC) $(LDFLAGS) -o scsitape scsitape.o mtxl.o $(EXTRA) $(LIBS)
125 scsitape.o: scsitape.c mtx.h mtxl.h
127 loaderinfo.o: loaderinfo.c mtx.h mtxl.h
129 tapeinfo.o: tapeinfo.c mtx.h mtxl.h
131 mam2debug.o: mam2debug.c mtx.h mtxl.h
133 mam2debug2.o: mam2debug2.c mtx.h mtxl.h
135 mtx.o: mtx.c mtx.h mtxl.h
137 mtxl.o: mtxl.c mtxl.h scsi_linux.c