Makefile 1.1 KB

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