Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031
  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. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  12. LDLIBS-c_executables = $(libs) $(level)../../../Pal/src/user_start.o
  13. $(c_executables): CFLAGS += $(CFLAGS-debug)
  14. $(c_executables): LDLIBS += $(LDFLAGS-debug) $(LDLIBS-c_executables) -lpal -lsysdb_debug
  15. %: %.c $(LDLIBS-c_executables)
  16. $(call cmd,csingle)
  17. LDLIBS-cxx_executables = $(libs) $(level)../../../Pal/src/user_start.o
  18. $(cxx_executables): CXXFLAGS += $(CFLAGS-debug)
  19. $(cxx_executables): LDLIBS += $(LDFLAGS-debug) $(LDLIBS-cxx_executables) -lpal -lsysdb_debug
  20. %: %.cpp $(LDLIBS-cxx_executables)
  21. $(call cmd,cxxsingle)
  22. else
  23. .IGNORE: $(c_executables) $(cxx_executables)
  24. $(c_executables) $(cxx_executables):
  25. endif