In the STM8S_StdPeriph_Lib's stm8.h file there is a section:
#if !defined HSE_Value
#if defined (STM8S208) || defined (STM8S207) || defined (STM8S007) || defined (STM8AF52Ax) || \
#define HSE_VALUE ((u32)24000000) /* Value of the External oscillator in Hz*/
#define HSE_VALUE ((u32)16000000) /* Value of the External oscillator in Hz*/
#endif /* STM8S208 || STM8S207 || STM8S007 || STM8AF62Ax || STM8AF52Ax */
#endif /* HSE_Value */
The first line HSE_Value should be HSE_VALUE because in this way there are no way to override the clock frequency from compiler defines (C is case sensitive language).
Please fix it in the next release! Thank you!