I know that given a finite set $X$ and a topology $\mathcal{T}$ on it, we can define a reflexive transitive relation by
$$ x\prec y \quad \text{if} \quad \overline{\{x\} } \subseteq \overline{ \{y\} }. $$
This relation gives the closed subsets of $X$ by
$$ A\text{ closed}\iff\forall a\in A\colon \forall x\in S\colon x\le a\to x\in A, $$
as stated here. By that way, for any reflexive transitive relation $R$ on a finite set we can define a topology from $R$.
I'm trying to determine whether we can define in an alternative method from a relation a topology, in a way that will also yield all topologies. The definition is as follows:
Given a relation $R\subseteq X\times X$, I can define for $x\in X$
$$ \ell_R(x):=\{ y\in X: (y,x) \in R \} $$ and
$$ r_R(x):=\{y\in X: (x,y)\in R \}. $$
My topology on $X$ would be the minimal topology containing $\ell_R(x)$ and $r_R(X)$ for all $x\in X$. This construction gives the discrete topology and the trivial topology so I'm not sure where to look for a counter example. I was hoping to reverse engineer a relation $R$ from $\prec$, but hit a mental block so far, and I thought that perhaps there is something basic which I'm overlooking that could help.
I would appreciate any constructive feedback.