Makefile 684 B

123456789101112131415161718192021222324252627282930
  1. GLIBC_SRC = glibc-2.17
  2. SHIM_DIR = shim
  3. BUILD_DIR = build
  4. GLIBC_TARGET = $(addprefix $(BUILD_DIR)/,libc.so.6 ld-linux-x86-64.so.2)
  5. all: $(GLIBC_TARGET)
  6. make -C $(SHIM_DIR)/src
  7. debug: DEBUG=debug
  8. debug: $(GLIBC_TARGET)
  9. make -C $(SHIM_DIR)/src debug
  10. # nothing to install
  11. install:
  12. $(GLIBC_TARGET): $(BUILD_DIR)/Makefile
  13. cd $(BUILD_DIR) && make
  14. $(BUILD_DIR)/Makefile: $(GLIBC_SRC)/configure
  15. ./buildglibc.py $(DEBUG)
  16. $(GLIBC_SRC)/configure:
  17. [ -f $(GLIBC_SRC).tar.gz ] || \
  18. wget http://ftp.gnu.org/gnu/glibc/$(GLIBC_SRC).tar.gz
  19. tar -xzf $(GLIBC_SRC).tar.gz
  20. [ ! -f $(GLIBC_SRC).patch ] || git apply $(GLIBC_SRC).patch
  21. clean:
  22. make -C $(SHIM_DIR)/src clean
  23. rm -rf $(BUILD_DIR)