Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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 ../../../../Makefile.configs
  8. include ../../../../Makefile.rules
  9. include ../Makefile.Test
  10. CFLAGS-debug += -fno-builtin -nostdlib
  11. $(PALDIR)/user_start.o: $(PALDIR)/user_start.S
  12. $(MAKE) -C $(PALDIR) $(notdir $@)
  13. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  14. LDLIBS-c_executables = $(libs) $(PALDIR)/user_start.o
  15. $(c_executables): CFLAGS += $(CFLAGS-debug)
  16. $(c_executables): LDLIBS += $(LDFLAGS-debug) $(LDLIBS-c_executables) -lpal -lsysdb_debug
  17. $(c_executables): %: %.c $(LDLIBS-c_executables)
  18. $(call cmd,csingle)
  19. LDLIBS-cxx_executables = $(libs) ../../../../Pal/src/user_start.o
  20. $(cxx_executables): CXXFLAGS += $(CFLAGS-debug)
  21. $(cxx_executables): LDLIBS += $(LDFLAGS-debug) $(LDLIBS-cxx_executables) -lpal -lsysdb_debug
  22. $(cxx_executables): %: %.cpp $(LDLIBS-cxx_executables)
  23. $(call cmd,cxxsingle)
  24. else
  25. .IGNORE: $(c_executables) $(cxx_executables)
  26. $(c_executables) $(cxx_executables):
  27. endif