File: Makefile.in

package info (click to toggle)
mtx 1.3.12-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,148 kB
  • sloc: ansic: 7,121; sh: 3,199; python: 203; perl: 117; makefile: 113
file content (177 lines) | stat: -rw-r--r-- 3,955 bytes parent folder | download
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# WARNING -- THIS HAS BEEN RE-WRITTEN TO USE GNU MAKE. DO NOT
# TRY TO PROCESS THIS WITH A NORMAL MAKE! (FREEBSD GUYS, THIS MEANS
# USE GMAKE, NOT REGULAR BSD MAKE!)
#
# Valid targets:
#  linux86 freebsd86 solarissparc sgi dec vms 
#
# Makefile changes by Lars Kellogg-Stedman for better integration with
# GNU Autoconf. 

# Version # for 'make dist'...
VERSION=1.3.12

BINS = mtx@EXEEXT@ tapeinfo@EXEEXT@ loaderinfo@EXEEXT@ scsitape@EXEEXT@ scsieject@EXEEXT@
EXTRA_BINS = nsmhack@EXEEXT@
DBGS := $(BINS:%@EXEEXT@=%.dbg)
MAN = mtx.1 tapeinfo.1 loaderinfo.1 scsitape.1 scsieject.1
MAN_HTML := $(MAN:%.1=%.html)
MAN_TXT := $(MAN:%.1=%.txt)

TARGET	= @TARGET@
CPU	= @CPU@
CC	= @CC@
INSTALL	= @INSTALL@

CFLAGS		= @CFLAGS@
CPPFLAGS	= @CPPFLAGS@ -DVERSION="\"$(VERSION)\"" -I$(srcdir) -I.
LDFLAGS		= @LDFLAGS@
LIBS		= @LIBS@
USE_OBJCOPY	= @USE_OBJCOPY@

INSTALL_DOC = $(INSTALL) -m 644
INSTALL_BIN = $(INSTALL) -m 755
INSTALL_DIR = $(INSTALL) -m 755 -d

DESTDIR		=
prefix		= @prefix@
exec_prefix	= @exec_prefix@
sbindir		= @sbindir@
mandir		= @mandir@
srcdir		= @srcdir@

VPATH = $(srcdir)

#
# Linux on x86...
#
ifeq ($(TARGET),linux)
CFLAGS += -Wall
CPPFLAGS	+= -DLONG_PRINT_REQUEST_SENSE=1
endif

ifeq ($(TARGET),mingw)
CFLAGS += -Wall
CPPFLAGS	+= -DLONG_PRINT_REQUEST_SENSE=1
endif

#
# FreeBSD
#
ifeq ($(TARGET),freebsd86)
CPPFLAGS	+= -DLONG_PRINT_REQUEST_SENSE=1
LIBS		+= -lcam
endif

ifeq ($(TARGET),hpux)
CFLAGS += -O -D_HPUX_SOURCE -D __hpux__ 
endif

#
# Solaris/SPARC
#
ifeq ($(TARGET),solarissparc)
CFLAGS		+= -O6
endif

#
# SGI IRIX
#
ifeq ($(TARGET),sgi)
CFLAGS		+= -O6
LIBS		+= -lds
endif

#
# Digital Unix
#
ifeq ($(TARGET),dec)
CFLAGS		+= -O
endif

#
# OpenVMS (see vms/000readme)
#
ifeq ($(TARGET),vms)
See vms/000readme for information.
endif

%.dbg : %@EXEEXT@
ifeq ($(USE_OBJCOPY),yes)
	objcopy --only-keep-debug $< $@
	objcopy --strip-debug $<
	objcopy --add-gnu-debuglink=$@ $<
else
	strip $< -o $@
endif

all:	$(BINS)

dbgs: $(DBGS)

install: $(BINS)
	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
	for file in $(BINS); do \
	$(INSTALL_BIN) "$$file" $(DESTDIR)$(sbindir) ; \
	done	
	$(INSTALL_DIR) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1
	for file in mtx.1 tapeinfo.1 scsitape.1 scsieject.1 loaderinfo.1 ; do \
	$(INSTALL_DOC) "$$file"  $(DESTDIR)$(mandir)/man1 ; \
	done

clean:
	rm -f *.o *~ mtx-*.zip
	rm -f $(BINS)
	rm -f $(DBGS)
	rm -f $(MAN_HTML)
	rm -f $(MAN_TXT)
	rm -f mam2debug@EXEEXT@ mam2debug2@EXEEXT@
	rm -rf autom4te.cache

distclean: clean
	rm -f Makefile config.h config.log config.cache config.status

dist: distclean
	./makedist $(VERSION)	

loaderinfo@EXEEXT@: loaderinfo.o mtxl.o mtxl.h mtx.h $(EXTRA)
	$(CC) $(LDFLAGS) -o loaderinfo@EXEEXT@ loaderinfo.o mtxl.o $(EXTRA) $(LIBS)

nsmhack@EXEEXT@: nsmhack.o mtxl.o $(EXTRA)
	$(CC) $(LDFLAGS) -o nsmhack@EXEEXT@ nsmhack.o mtxl.o $(EXTRA) $(LIBS)

mtx@EXEEXT@: mtx.o mtxl.o mtxl.h mtx.h $(EXTRA)
	$(CC) $(LDFLAGS) -o mtx@EXEEXT@ mtx.o mtxl.o $(EXTRA) $(LIBS)

mam2debug@EXEEXT@: mtxl.o mam2debug.o mtx.h $(EXTRA)	
	$(CC) $(LDFLAGS) -o mam2debug@EXEEXT@ mtxl.o mam2debug.o $(EXTRA) $(LIBS)

tapeinfo@EXEEXT@: tapeinfo.o mtxl.o mtx.h mtxl.h $(EXTRA)
	$(CC) $(LDFLAGS) -o tapeinfo@EXEEXT@ tapeinfo.o mtxl.o $(EXTRA) $(LIBS)

mam2debug2@EXEEXT@: mtxl.o mam2debug2.o mtx.h $(EXTRA)
	$(CC) $(LDFLAGS) -o mam2debug2@EXEEXT@ mtxl.o mam2debug2.o $(EXTRA) $(LIBS)

scsitape@EXEEXT@: scsitape.o mtxl.o mtxl.h mtx.h $(EXTRA)
	$(CC) $(LDFLAGS) -o scsitape@EXEEXT@ scsitape.o mtxl.o $(EXTRA) $(LIBS)

scsitape.o: scsitape.c mtx.h mtxl.h

scsieject@EXEEXT@: scsieject.o mtxl.o mtxl.h mtx.h $(EXTRA)
	$(CC) $(LDFLAGS) -o scsieject@EXEEXT@ scsieject.o mtxl.o $(EXTRA) $(LIBS)

scsieject.o: scsieject.c mtx.h mtxl.h

loaderinfo.o: loaderinfo.c mtx.h mtxl.h

tapeinfo.o: tapeinfo.c mtx.h mtxl.h

mam2debug.o: mam2debug.c mtx.h mtxl.h

mam2debug2.o: mam2debug2.c mtx.h mtxl.h

mtx.o: mtx.c mtx.h mtxl.h

mtxl.o: mtxl.c mtx.h mtxl.h scsi_linux.c scsi_win32.c

nsmhack.o: nsmhack.c mtxl.h mtx.h