$NetBSD: patch-ae,v 1.4 2008/02/27 22:31:52 jlam Exp $ --- pwm/Makefile.orig 2004-07-28 23:10:32.000000000 -0400 +++ pwm/Makefile @@ -21,23 +21,24 @@ LIBS += $(LTDL_LIBS) EXT_OBJS += ../ioncore/ioncore.a ../luaextl/luaextl.a EXT_OBJS += ../libtu/libtu.a -DEFINES += -DETCDIR=\"$(ETCDIR)\" -DSHAREDIR=\"$(SHAREDIR)\" \ - -DEXTRABINDIR=\"$(EXTRABINDIR)\" -DMODULEDIR=\"$(MODULEDIR)\" \ - -DLCDIR=\"$(LCDIR)\" +DEFINES += -DETCDIR=\"$(INST_ETCDIR)\" -DSHAREDIR=\"$(INST_SHAREDIR)\" \ + -DEXTRABINDIR=\"$(INST_EXTRABINDIR)\" -DMODULEDIR=\"$(INST_MODULEDIR)\" \ + -DLCDIR=\"$(INST_LCDIR)\" ifndef PWM_ETCDIR -PWM_ETCDIR = $(ETCDIR) +INST_PWM_ETCDIR = $(INST_ETCDIR) +PWM_ETCDIR = $(DESTDIR)$(INST_PWM_ETCDIR) else -DEFINES += -DPWM_ETCDIR=\"$(PWM_ETCDIR)\" +DEFINES += -DPWM_ETCDIR=\"$(INST_PWM_ETCDIR)\" endif CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE) ifeq ($(PRELOAD_MODULES),1) LDFLAGS += $(foreach mod, $(PWM_MODULE_LIST), -dlpreopen ../$(mod)/$(mod).la) -LINKOPTS = -R$(MODULEDIR) +LINKOPTS = -R$(INST_MODULEDIR) else -LINKOPTS = -export-dynamic -R$(MODULEDIR) +LINKOPTS = -export-dynamic -R$(INST_MODULEDIR) endif SOURCES = pwm.c @@ -55,8 +56,8 @@ pwm: $(OBJS) $(EXT_OBJS) _install: $(INSTALLDIR) $(BINDIR) - $(INSTALL) -s -m $(BIN_MODE) pwm $(BINDIR) - # $(STRIP) $(BINDIR)/pwm + $(INSTALL) -s -m $(BIN_MODE) pwm $(BINDIR)/pwm2 + # $(STRIP) $(BINDIR)/pwm2 $(INSTALLDIR) $(PWM_ETCDIR) for i in $(ETC); do \ $(INSTALL) -m $(DATA_MODE) $$i $(PWM_ETCDIR); \