81 lines
2.6 KiB
Plaintext
81 lines
2.6 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.2 2003/08/09 17:39:16 pvalchev Exp $
|
|
--- Makefile.orig 1998-12-16 05:34:09.000000000 -0700
|
|
+++ Makefile 2003-08-09 11:40:17.000000000 -0600
|
|
@@ -5,10 +5,10 @@
|
|
# @(#)$Id: patch-Makefile,v 1.2 2003/08/09 17:39:16 pvalchev Exp $
|
|
#
|
|
|
|
-PREFIX?=/usr/local
|
|
BINDIR=$(PREFIX)/bin
|
|
-ETCDIR=$(PREFIX)/etc
|
|
MANDIR=$(PREFIX)/man
|
|
+SAMPLEDIR=$(PREFIX)/share/examples/tosha
|
|
+ETCDIR=$(SYSCONFDIR)
|
|
|
|
###################################################
|
|
###### ######
|
|
@@ -16,52 +16,40 @@ MANDIR=$(PREFIX)/man
|
|
###### ######
|
|
###################################################
|
|
|
|
-CFLAGS?=-O2
|
|
-CFLAGS+=-Wall -ansi -DGLOBAL_ETC_DIR=\"$(ETCDIR)\"
|
|
-
|
|
-.if (exists(/usr/include/camlib.h))
|
|
-CFLAGS+=-DCAM
|
|
-LDFLAGS=-lcam
|
|
-.else
|
|
-LDFLAGS=-lscsi
|
|
-.endif
|
|
-
|
|
-GZIP_CMD?=gzip -9
|
|
+CFLAGS+= -DGLOBAL_ETC_DIR=\"$(ETCDIR)\"
|
|
|
|
BINS=tosha pcmplay pcmfade
|
|
-OBJS=utils.o getlopt.o tosha.o toscsi.o toform.o toconf.o pcmplay.o pcmfade.o
|
|
+OBJS=utils.o getlopt.o tosha.o libscsi.o toscsi.o toform.o toconf.o pcmplay.o pcmfade.o
|
|
|
|
all: $(BINS)
|
|
|
|
utils.o: utils.c utils.h
|
|
getlopt.o: getlopt.c getlopt.h
|
|
tosha.o: tosha.c global.h toscsi.h toform.h toconf.h utils.h getlopt.h
|
|
+libscsi.o: libscsi.c libscsi.h
|
|
toscsi.o: toscsi.c global.h toscsi.h utils.h
|
|
toform.o: toform.c global.h toform.h utils.h
|
|
toconf.o: toconf.c global.h toconf.h utils.h
|
|
pcmplay.o: pcmplay.c utils.h getlopt.h
|
|
pcmfade.o: pcmfade.c utils.h
|
|
|
|
-tosha: tosha.o toscsi.o toform.o toconf.o utils.o getlopt.o
|
|
- $(CC) $(CFLAGS) -o tosha \
|
|
- tosha.o toscsi.o toform.o toconf.o utils.o getlopt.o $(LDFLAGS)
|
|
+tosha: tosha.o libscsi.o toscsi.o toform.o toconf.o utils.o getlopt.o
|
|
+ $(CC) $(CFLAGS) -o tosha tosha.o libscsi.o toscsi.o toform.o toconf.o \
|
|
+ utils.o getlopt.o -lossaudio
|
|
|
|
pcmplay: pcmplay.o utils.o getlopt.o
|
|
- $(CC) $(CFLAGS) -o pcmplay pcmplay.o utils.o getlopt.o
|
|
+ $(CC) $(CFLAGS) -o pcmplay pcmplay.o utils.o getlopt.o -lossaudio
|
|
|
|
pcmfade: pcmfade.o utils.o
|
|
$(CC) $(CFLAGS) -o pcmfade pcmfade.o utils.o
|
|
|
|
install: $(BINS)
|
|
strip $(BINS)
|
|
- install -s -g bin -o bin -m 755 $(BINS) $(BINDIR)
|
|
- install -c -g bin -o bin -m 644 tosharc $(ETCDIR)
|
|
- install -c -g bin -o bin -m 644 tosha.1 pcmplay.1 pcmfade.1 \
|
|
+ install -s -o root -g bin -m 755 $(BINS) $(BINDIR)
|
|
+ install -d -o root -g wheel -m 755 $(SAMPLEDIR)
|
|
+ install -c -o root -g wheel -m 644 tosharc $(SAMPLEDIR)/tosharc.sample
|
|
+ install -c -o root -g wheel -m 644 tosha.1 pcmplay.1 pcmfade.1 \
|
|
$(MANDIR)/man1
|
|
-.if !defined(NOMANCOMPRESS)
|
|
- cd $(MANDIR)/man1 ; \
|
|
- $(GZIP_CMD) tosha.1 pcmplay.1 pcmfade.1
|
|
-.endif
|
|
|
|
clean:
|
|
rm -f $(OBJS) *core $(BINS)
|