You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.6KB

  1. #
  2. # Common lib makefile for GCC / Linux target
  3. #
  4. #
  5. #
  6. # In order to extend existing targets, add
  7. # your targets to the
  8. #
  9. # HELP_RULES - extends "help" target
  10. # INSTALL_RULES - extends "install" target
  11. # BIN_RULES - extends "bin" target
  12. # CLEAN_RULES - extends "clean" target
  13. # REALCLEAN_RULES - extends "realclean" target
  14. #
  15. # variables
  16. #
  17. #
  18. #
  19. # Determine TARGET filename if only TARGET_BASENAME name is known
  20. #
  21. ifeq ("$(TARGET)","")
  22. TARGET=$(TARGET_BASENAME).a
  23. endif
  24. CPPFLAGS += -I"$(VSVR_BASE_DIR)/dep/yac/" -DLINUX $(EXTRAFLAGS)
  25. # -DYAC_FORCE_NO_TLS
  26. EXTRALIBS +=
  27. #
  28. # Build plugin library
  29. #
  30. bin: $(BIN_RULES) $(ALL_OBJ)
  31. # $(LD) $(LDFLAGS_SIZE) -OUT:$(TARGET) $(ALL_OBJ) $(EXTRALIBS)
  32. $(AR) r $(TARGET) $(ALL_OBJ)
  33. # $(EXTRALIBS)
  34. @ls -1l $(TARGET)
  35. @echo "Build finished at `date +%H:%M`."
  36. .cpp.o:
  37. $(CC) $(CPPFLAGS) $(OPTFLAGS_PLUGIN) -c "$<" -o"$@"
  38. .cc.o:
  39. $(CC) $(CPPFLAGS) $(OPTFLAGS_PLUGIN) -c "$<" -o"$@"
  40. .c.o:
  41. $(CC) $(CPPFLAGS) $(OPTFLAGS_PLUGIN) -c "$<" -o"$@"
  42. #
  43. # Install plugin
  44. # (Note: cannot depend on "bin" target since this would overwrite the UPX compressed file..)
  45. #
  46. .PHONY: install
  47. install: $(INSTALL_RULES)
  48. $(CP) $(TARGET) $(LIB_INSTALL_PREFIX)
  49. @echo "[...] $(TARGET) installed to \"$(LIB_INSTALL_PREFIX)\".";
  50. #
  51. # Make clean and remove backup files
  52. #
  53. .PHONY: realclean
  54. realclean: $(REALCLEAN_RULES) clean
  55. $(RM) `$(FIND) . -name \*\~` $(TARGET) *.exp *.lib *.plg *.ncb *.map *.manifest *.a
  56. #
  57. # Remove object files and targets.
  58. #
  59. .PHONY: clean
  60. clean: $(CLEAN_RULES)
  61. @echo "[...] cleaning up.."
  62. $(RM) $(ALL_OBJ) $(TARGET)