| 1 |
# Module.mk |
| 2 |
# Copyright (c) 1998, 1999 Frodo Looijaard <[email protected]> |
| 3 |
# |
| 4 |
# This program is free software; you can redistribute it and/or modify |
| 5 |
# it under the terms of the GNU General Public License as published by |
| 6 |
# the Free Software Foundation; either version 2 of the License, or |
| 7 |
# (at your option) any later version. |
| 8 |
# |
| 9 |
# This program is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with this program; if not, write to the Free Software |
| 16 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 17 |
# MA 02110-1301 USA. |
| 18 |
|
| 19 |
MODULE_DIR := prog/pwm |
| 20 |
PROGPWMDIR := $(MODULE_DIR) |
| 21 |
|
| 22 |
PROGPWMMAN8DIR := $(MANDIR)/man8 |
| 23 |
PROGPWMMAN8FILES := $(MODULE_DIR)/fancontrol.8 $(MODULE_DIR)/pwmconfig.8 |
| 24 |
|
| 25 |
PROGPWMTARGETS := $(MODULE_DIR)/fancontrol \ |
| 26 |
$(MODULE_DIR)/pwmconfig |
| 27 |
|
| 28 |
# The vt1211_pwm script is not installed by default, pass VT1211_PWM=1 |
| 29 |
# to get it |
| 30 |
ifeq ($(VT1211_PWM),1) |
| 31 |
PROGPWMMAN8FILES += $(MODULE_DIR)/vt1211_pwm.8 |
| 32 |
PROGPWMTARGETS += $(MODULE_DIR)/vt1211_pwm |
| 33 |
endif |
| 34 |
|
| 35 |
REMOVEPWMBIN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(SBINDIR)/%,$(PROGPWMTARGETS)) |
| 36 |
REMOVEPWMMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGPWMMAN8DIR)/%,$(PROGPWMMAN8FILES)) |
| 37 |
|
| 38 |
install-prog-pwm: $(PROGPWMTARGETS) |
| 39 |
$(MKDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(PROGPWMMAN8DIR) |
| 40 |
$(INSTALL) -m 755 $(PROGPWMTARGETS) $(DESTDIR)$(SBINDIR) |
| 41 |
$(INSTALL) -m 644 $(PROGPWMMAN8FILES) $(DESTDIR)$(PROGPWMMAN8DIR) |
| 42 |
|
| 43 |
user_install :: install-prog-pwm |
| 44 |
|
| 45 |
user_uninstall:: |
| 46 |
$(RM) $(REMOVEPWMBIN) |
| 47 |
$(RM) $(REMOVEPWMMAN) |