#
# zmixer - audio mixer
# Copyright (C) 2005 Bryan Beicker <tokiko@tokiko.net>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (Version 2)
# as published by the Free Software Foundation.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#

PREFIX = /prog/zmixer
RUNDIR = /prog/zmixer/run

GTK_CFLAGS = `pkg-config --cflags gtk+-2.0`
GTK_LIBS = `pkg-config --libs gtk+-2.0`
OBJECTS = main.o zmixer.w.o zmixer.z.o


zmixer: $(OBJECTS)
	$(CC) -Wall $(OBJECTS) $(LDFLAGS) -o $@ $(GTK_CFLAGS) $(GTK_LIBS) -lasound
	strip $@

%.o: %.c main.h
	$(CC) -Wall $(CFLAGS) -c $< $(GTK_CFLAGS)

clean:
	rm -f *.o zmixer

install: zmixer
	mkdir -p -m 755 $(PREFIX)
	mkdir -p -m 755 $(RUNDIR)
	cp zmixer $(RUNDIR)
	chmod 755 $(RUNDIR)/zmixer
				
