Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.configs
  8. include ../../../../Scripts/Makefile.manifest
  9. include ../../../../Scripts/Makefile.Test
  10. .PHONY: crt_init-recurse
  11. crt_init-recurse:
  12. $(MAKE) -C ../crt_init all
  13. ../crt_init/user_shared_start.o ../crt_init/user_start.o: crt_init-recurse
  14. @true
  15. LDLIBS-user_start = $(PALDIR)/../crt_init/user_start.o
  16. .PHONY: crt_init-recurse
  17. crt_init-recurse:
  18. $(MAKE) -C $(PALDIR)/../crt_init/ all
  19. $(PALDIR)/../crt_init/user_start.o: crt_init-recurse
  20. @true
  21. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  22. CFLAGS += $(CFLAGS-libos-debug)
  23. CXXFLAGS += $(CXXFLAGS-libos-debug)
  24. LDLIBS += $(LDLIBS-user_start) $(LDFLAGS-libos-debug)
  25. $(c_executables): %: %.c $(LDLIBS-user_start)
  26. $(call cmd,csingle)
  27. $(cxx_executables): %: %.cpp $(LDLIBS-user_start)
  28. $(call cmd,cxxsingle)
  29. else
  30. .IGNORE: $(c_executables) $(cxx_executables)
  31. $(c_executables) $(cxx_executables):
  32. endif