# Makefile for standalone cddbcmd (of xmcd-2.6)

# Goddamn GPL should be applied to this file.
# (c) 2002 NAMBA Seiichi <sn@asahi-net.email.ne.jp>

# s.n. Mon Sep  9 13:38:23 2002

mandir=/usr/local/man/man1
bindir=/usr/local/bin

all: cddbcmd
cddbcmd: util_d/cddbcmd.o
	rm -f cddbcmd
	gcc -s -o cddbcmd util_d/cddbcmd.o

util_d/cddbcmd.o:
	( cd util_d; gcc -O2 -I.. -c -o cddbcmd.o cddbcmd.c )

clean:
	rm -f util_d/*.o cddbcmd

install.man: install-man
install-man:
	install -c -m 644 util_d/cddbcmd.man $(mandir)/cddbcmd.1x

install:
	install -c -s -m 755 cddbcmd $(bindir)

tar: clean
	( cd .. ; tar -zvcf cddbcmd-xmcd-2.6.tar.gz cddbcmd-xmcd-2.6 )

# Original .o compiling line in linux.
# gcc -O2 -fno-strength-reduce -I.. -D_POSIX_C_SOURCE=199309L -DNO_MESSAGE_CATALOG -DFUNCPROTO=15 -DNARROWPROTO -DUSE_TERMIOS -c -o cddbcmd.o cddbcmd.c
