Makefile 1.0 KB

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