# Copyright 2005-2009 by Purdue Research Foundation, West Lafayette, IN 47906.
# All rights reserved.
# 
# This program 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.


INSTDIR=$(DESTDIR)/usr/lib
ETCDIR=$(DESTDIR)/etc
OWNER=root
GROUP=root
WEBOWNER=www-data
WEBGROUP=www-data

CFLAGS	= 
LDFLAGS	=

clean:
	rm -f *.o telequotad build-stamp configure-stamp

install: telequotad
	install --owner $(OWNER) --group $(GROUP) --mode 0770 -d $(INSTDIR)/hubzero/
	install --owner $(OWNER) --group $(GROUP) --mode 0770 -d $(INSTDIR)/hubzero/bin
	install telequotad $(INSTDIR)/hubzero/bin/telequotad --owner $(OWNER) --group $(GROUP) --mode 0755
	install --owner $(OWNER) --group $(WEBGROUP) --mode 0770 -d $(ETCDIR)/hubzero/
	
	install telequotad.conf $(ETCDIR)/hubzero/telequotad.conf --owner $(OWNER) --group $(GROUP) --mode 0644
	install trim $(INSTDIR)/hubzero/bin/telequotad --owner $(OWNER) --group $(GROUP) --mode 0755
	install --owner $(OWNER) --group $(GROUP) --mode 0700 -D telequotad.rc  $(ETCDIR)/init.d/telequotad

%: %.o
	$(CC) -o $@ $^ $(LDFLAGS)

