Makefile 770 B

123456789101112131415161718192021222324252627
  1. c_executables = $(patsubst %.c,%,$(wildcard *.c))
  2. cxx_executables = $(patsubst %.cpp,%,$(wildcard *.cpp))
  3. target = $(c_executables) $(cxx_executables) manifest
  4. level = ../
  5. include ../Makefile
  6. CFLAGS-debug += -fno-builtin -nostdlib
  7. ifeq ($(SYS),x86_64-linux-gnu)
  8. $(c_executables): %: %.c $(libs) $(level)../../../Pal/src/user_start.o
  9. @echo [ $@ ]
  10. $(CC) $(CFLAGS-debug) $(LDFLAGS-debug) -o $@ $^ -lpal -lsysdb_debug
  11. $(cxx_executables): %: %.cpp $(libs) $(level)../../../Pal/src/user_start.o
  12. @echo [ $@ ]
  13. $(CXX) $(CFLAGS-debug) $(LDFLAGS-debug) -o $@ $^ -lpal -lsysdb_debug
  14. .PHONY: pack
  15. pack: $(c_executables) $(cxx_executables)
  16. @../../../../Scripts/pack_binaries.sh test $^
  17. else
  18. $(c_executables) $(cxx_executables): .packed/test.tar.gz
  19. tar -xmozf $< $@
  20. endif