Copy both x25519.c and x25519.h into your project and include the header where needed.
The x25519.h header provides
void x25519(uint8_t *public, const uint8_t *secret, const uint8_t *basepoint);
which you can use to build functions for deriving public and shared keys.
See key_exchange.c for a full example.