#
# Copyright (c) 2003 Linuxant inc.
# Copyright (c) 2001-2003 Conexant Systems, Inc.
#
# NOTE: The use and distribution of this software is governed by the terms in
# the file LICENSE, which is included in the package. You must read this and
# agree to these terms before using or distributing this software.
# 
TOP= ..

include $(TOP)/config.mak

all: hsfconfig

hsfconfig: hsfconfig.in
	sed \
		-e 's!@PREFIX@!$(PREFIX)!g' \
		-e 's!@HSFETCDIR@!$(HSFETCDIR)!g' \
		-e 's!@HSFLIBDIR@!$(HSFLIBDIR)!g' \
		-e 's!@HSFINFDIR@!$(HSFINFDIR)!g' \
		-e 's!@HSFSERIALMINOR@!$(HSFSERIALMINOR)!g' \
		-e 's!@HSFBININF_FILE@!$(HSFBININF_FILE)!g' \
		-e 's!@HSFFIRMWR_FILE@!$(HSFFIRMWR_FILE)!g' \
		-e 's!@HSFLINUXVERSION@!$(HSFLINUXVERSION)!g' \
		< $< > $@
	chmod 755 hsfconfig

BIN_SCRIPTS=
SBIN_SCRIPTS= hsfconfig hsfstop

install: $(SBIN_SCRIPTS) $(BIN_SCRIPTS) \
			$(HSFBINDIR) $(HSFSBINDIR) $(HSFETCDIR)
	$(INSTALL) -m 755 $(SBIN_SCRIPTS) $(HSFSBINDIR)
#	$(INSTALL) -m 755 $(BIN_SCRIPTS) $(HSFBINDIR)

$(HSFBINDIR) $(HSFSBINDIR) $(HSFETCDIR):
	$(MKDIR) -p $@

uninstall:
	rm -f \
			$(patsubst %, "$(HSFSBINDIR)/%", $(SBIN_SCRIPTS)) \
			$(patsubst %, "$(HSFBINDIR)/%", $(BIN_SCRIPTS))

clean:
	rm -f hsfconfig

