Makefile 758 B

1234567891011121314151617181920212223242526272829
  1. CFLAGS-libos = -L../../../build/libos -I../../include
  2. c_executables = $(patsubst %.c,%,$(wildcard *.c))
  3. cxx_executables = $(patsubst %.cpp,%,$(wildcard *.cpp))
  4. target = $(c_executables) $(cxx_executables) \
  5. manifest pal pal_sec
  6. level = ../
  7. include ../Makefile
  8. %.manifest: %.manifest.template
  9. rm -rf $@
  10. cp $@.template $@
  11. ifeq ($(SYS),x86_64-linux-gnu)
  12. $(c_executables): %: %.c
  13. @echo [ $@ ]
  14. @$(CC) $(CFLAGS) $(if $(findstring .libos,$@),$(CFLAGS-libos),) -o $@ $< \
  15. $(shell echo $@ | sed 's/^[^\.]*//g' | sed 's/\./ -l/g')
  16. $(cxx_executables): %: %.cpp
  17. @echo [ $@ ]
  18. @$(CC) $(CFLAGS) -o $@ $< \
  19. $(shell echo $@ | sed 's/^[^\.]*//g' | sed 's/\./ -l/g')
  20. else
  21. .IGNORE: $(c_executables) $(cxx_executables)
  22. $(c_executables) $(cxx_executables):
  23. endif