Makefile 718 B

12345678910111213141516171819202122232425262728
  1. # Makefile to build lxdialog package
  2. #
  3. all: lxdialog
  4. # Use reursively expanded variables so we do not call gcc unless
  5. # we really need to do so. (Do not call gcc as part of make mrproper)
  6. CFLAGS := $(shell sh check-lxdialog.sh -ccflags)
  7. LIBS := $(shell sh check-lxdialog.sh -ldflags gcc)
  8. # workaround for OpenBSD, which does not use symlinks to libncurses.so
  9. OS := $(shell uname -s)
  10. ifeq ($(strip $(OS)),OpenBSD)
  11. LIBS := -lncurses
  12. endif
  13. ifeq ($(shell uname -o),Cygwin)
  14. LIBS := -lncurses
  15. endif
  16. always := $(hostprogs-y) dochecklxdialog
  17. %.o: %.c
  18. $(CC) -c $(CFLAGS) -o $@ $<
  19. lxdialog: checklist.o menubox.o textbox.o yesno.o inputbox.o util.o lxdialog.o msgbox.o
  20. $(CC) -o $@ $^ $(LIBS)
  21. clean:
  22. rm -f *.o lxdialog