In Bug 78, shortkey points out:
[oweals/busybox.git] / applets / Makefile.in
index 79582e0697390f9cda6d12a7625c4f4b17c7c394..e31bb6fd915db2659a6c4997691c7542a83b57b6 100644 (file)
 
 APPLETS_AR:=applets.a
 ifndef $(APPLETS_DIR)
-APPLETS_DIR:=$(TOPDIR)applets/
+APPLETS_DIR:=$(top_builddir)/applets/
 endif
+srcdir=$(top_srcdir)/applets
 
-APPLET_SRC:=applets.c busybox.c usage.c
+APPLET_SRC:=applets.c busybox.c
 APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
 
-
-
 libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
 
-$(APPLET_OBJ): $(TOPDIR).config
-
 $(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
        $(AR) -ro $@ $(APPLET_OBJ)
 
+$(APPLET_OBJ): $(top_builddir)/.config
+$(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c
+       $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+