Makefile 842 B

123456789101112131415161718192021222324252627282930
  1. c_executables = $(patsubst %.c,%,$(wildcard *.c))
  2. cxx_executables = $(patsubst %.cpp,%,$(wildcard *.cpp))
  3. exec_target = $(c_executables) $(cxx_executables)
  4. target = $(c_executables) $(cxx_executables) manifest
  5. .PHONY: default
  6. default: all
  7. include ../../../../Scripts/Makefile.Test
  8. LDLIBS-user_start = $(PALDIR)/user_start.o
  9. $(PALDIR)/user_start.o: $(PALDIR)/user_start.S
  10. $(MAKE) -C $(PALDIR) $(notdir $@)
  11. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  12. CFLAGS += $(CFLAGS-libos-debug)
  13. CXXFLAGS += $(CXXFLAGS-libos-debug)
  14. LDLIBS += $(LDLIBS-user_start) $(LDFLAGS-libos-debug)
  15. $(c_executables): %: %.c $(LDLIBS-user_start)
  16. $(call cmd,csingle)
  17. $(cxx_executables): %: %.cpp $(LDLIBS-user_start)
  18. $(call cmd,cxxsingle)
  19. else
  20. .IGNORE: $(c_executables) $(cxx_executables)
  21. $(c_executables) $(cxx_executables):
  22. endif