rules.mk 1015 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. TGT_DIR += $(b)pybison $(b)jquery
  2. PYBISON_INC := -Iexternal/pybison/src/c -I/usr/include/python2.7
  3. build: $(b)pybison/bison_.so
  4. BISON_OBJ := $(b)pybison/bison_.o $(b)pybison/bison_callback.o \
  5. $(b)pybison/bisondynlib-linux.o
  6. $(b)pybison/bison_.so: $(BISON_OBJ)
  7. $(CC) $(CFLAGS) -shared -pthread -o $@ $^
  8. $(BISON_OBJ): | $(b)pybison
  9. $(CC) $(CFLAGS) -o $@ -c $< -pthread -fPIC $(PYBISON_INC)
  10. $(b)pybison/bisondynlib-linux.o: $(d)pybison/src/c/bisondynlib-linux.c
  11. $(b)pybison/bison_callback.o: $(d)pybison/src/c/bison_callback.c
  12. $(b)pybison/bison_.o: $(b)pybison/bison_.c
  13. ifdef PYREX
  14. py2c := pyrexc
  15. else
  16. ifdef CYTHON_0_14
  17. py2c := cython --fast-fail --line-directives
  18. else
  19. py2c := cython -Wextra -Werror --fast-fail --line-directives
  20. endif
  21. endif
  22. $(b)pybison/%.c: $(d)pybison/src/pyrex/%.pyx
  23. $(py2c) $(py2c_OPTS) -o $@ $<
  24. $(RM) $(@D)/*.so
  25. build: $(b)jquery/jquery.min.js
  26. $(b)jquery/jquery.min.js: $(d)jquery/version.txt | $(b)jquery
  27. $(MAKE) -C external/jquery
  28. ln -sf ../../../$(<D)/dist/jquery.min.js $@