summaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/Makefile10
-rw-r--r--loginutils/Makefile.in6
2 files changed, 11 insertions, 5 deletions
diff --git a/loginutils/Makefile b/loginutils/Makefile
index a013d14..98226ae 100644
--- a/loginutils/Makefile
+++ b/loginutils/Makefile
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-TOPDIR:= ../
+top_srcdir=..
+top_builddir=..
+srcdir=$(top_srcdir)/loginutils
LOGINUTILS_DIR:=./
-include $(TOPDIR).config
-include $(TOPDIR)Rules.mak
+include $(top_builddir)/Rules.mak
+include $(top_builddir)/.config
include Makefile.in
all: $(libraries-y)
--include $(TOPDIR).depend
+-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
diff --git a/loginutils/Makefile.in b/loginutils/Makefile.in
index d6ffd3b..96a61e6 100644
--- a/loginutils/Makefile.in
+++ b/loginutils/Makefile.in
@@ -19,8 +19,9 @@
LOGINUTILS_AR:=loginutils.a
ifndef LOGINUTILS_DIR
-LOGINUTILS_DIR:=$(TOPDIR)loginutils/
+LOGINUTILS_DIR:=$(top_builddir)/loginutils/
endif
+srcdir=$(top_srcdir)/loginutils
LOGINUTILS-y:=
LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o
@@ -51,3 +52,6 @@ endif
$(LOGINUTILS_DIR)$(LOGINUTILS_AR): $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y))
$(AR) -ro $@ $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y))
+$(LOGINUTILS_DIR)%.o: $(srcdir)/%.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+