summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile22
-rw-r--r--scripts/lxdialog/Makefile25
2 files changed, 15 insertions, 32 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index 9968873e37ae..11509a5bfd74 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -9,12 +9,6 @@ CHMOD_FILES := docgen gen-all-syms kernel-doc mkcompile_h makelst
all: fixdep split-include $(CHMOD_FILES)
-fixdep: fixdep.c
- $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
-split-include: split-include.c
- $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
$(CHMOD_FILES): FORCE
@chmod a+x $@
@@ -43,23 +37,15 @@ kconfig.tk: $(TOPDIR)/arch/$(ARCH)/config.in tkparse $(HEADER) $(TAIL) FORCE
) > $@
chmod 755 $@
-tkparse: tkparse.o tkcond.o tkgen.o
- $(HOSTCC) -o $@ $^
-
-tkparse.o tkcond.o tkgen.o: %.o: %.c
- $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
-
# DocBook stuff
# ---------------------------------------------------------------------------
doc-progs: docproc
-docproc: docproc.c
- $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
-include $(TOPDIR)/Rules.make
+# ---------------------------------------------------------------------------
-# we don't have automatic deps for host programs
+host-progs := fixdep split-include docproc tkparse
-tkparse.o tkcond.o tkgen.o: tkparse.h
+tkparse-objs := tkparse.o tkcond.o tkgen.o
+include $(TOPDIR)/Rules.make
diff --git a/scripts/lxdialog/Makefile b/scripts/lxdialog/Makefile
index ed8d17c37823..1ab9518b1656 100644
--- a/scripts/lxdialog/Makefile
+++ b/scripts/lxdialog/Makefile
@@ -1,35 +1,32 @@
-HOSTCFLAGS += -DLOCALE
-LIBS = -lncurses
+HOST_EXTRACFLAGS := -DLOCALE
+HOST_LOADLIBES := -lncurses
ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
- HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
+ HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
else
ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
- HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
+ HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
else
ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
- HOSTCFLAGS += -DCURSES_LOC="<ncurses.h>"
+ HOST_EXTRACFLAGS += -DCURSES_LOC="<ncurses.h>"
else
- HOSTCFLAGS += -DCURSES_LOC="<curses.h>"
+ HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>"
endif
endif
endif
+host-progs := lxdialog
-OBJS = checklist.o menubox.o textbox.o yesno.o inputbox.o \
- util.o lxdialog.o msgbox.o
-
-%.o: %.c
- $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
+lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
+ util.o lxdialog.o msgbox.o
all: ncurses lxdialog
-lxdialog: $(OBJS)
- $(HOSTCC) -o lxdialog $(OBJS) $(LIBS)
+include $(TOPDIR)/Rules.make
ncurses:
@echo "main() {}" > lxtemp.c
- @if $(HOSTCC) -lncurses lxtemp.c ; then \
+ @if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \
rm -f lxtemp.c a.out; \
else \
rm -f lxtemp.c; \