Yeah, I figured it was something like that.
I'll try to play around with HX's makefile, thanks for the link!
Here is the original error:
In file included from DATS/hello_dats.c:36:
/usr/lib/ats2-postiats-0.4.2/prelude/CATS/char.cats: In function 'atspre_isascii_int':
/usr/lib/ats2-postiats-0.4.2/prelude/CATS/char.cats:377:11: warning: implicit declaration of function 'isascii' [-Wimplicit-function-declaration]
377 | return (isascii(c) ? atsbool_true : atsbool_false) ;
| ^~~~~~~
In file included from DATS/hello_dats.c:15:
DATS/hello_dats.c: In function 'mainats_0_void':
DATS/hello_dats.c:206:18: error: 'PMVtmpltcstmat' undeclared (first use in this function)
206 | ATSINSmove(tmp9, PMVtmpltcstmat[0](g1int_mul<S2Eextkind(atstype_int)>)(ATSPMVintrep(240), ATSPMVintrep(160))) ;
| ^~~~~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:206:18: note: each undeclared identifier is reported only once for each function it appears in
206 | ATSINSmove(tmp9, PMVtmpltcstmat[0](g1int_mul<S2Eextkind(atstype_int)>)(ATSPMVintrep(240), ATSPMVintrep(160))) ;
| ^~~~~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:206:36: error: 'g1int_mul' undeclared (first use in this function)
206 | SINSmove(tmp9, PMVtmpltcstmat[0](g1int_mul<S2Eextkind(atstype_int)>)(ATSPMVintrep(240), ATSPMVintrep(160))) ;
| ^~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:206:46: warning: implicit declaration of function 'S2Eextkind' [-Wimplicit-function-declaration]
206 | mp9, PMVtmpltcstmat[0](g1int_mul<S2Eextkind(atstype_int)>)(ATSPMVintrep(240), ATSPMVintrep(160))) ;
| ^~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:206:57: error: expected expression before 'atstype_int'
206 | ltcstmat[0](g1int_mul<S2Eextkind(atstype_int)>)(ATSPMVintrep(240), ATSPMVintrep(160))) ;
| ^~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:206:70: error: expected expression before ')' token
206 | 1int_mul<S2Eextkind(atstype_int)>)(ATSPMVintrep(240), ATSPMVintrep(160))) ;
| ^
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c: In function 'fill_screen_2':
DATS/hello_dats.c:290:18: error: 'PMVtmpltcstmat' undeclared (first use in this function)
290 | ATSINSmove(tmp3, PMVtmpltcstmat[0](lt_g1int_int<S2Eextkind(atstype_int)>)(arg0, arg1)) ;
| ^~~~~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:290:36: error: 'lt_g1int_int' undeclared (first use in this function)
290 | SINSmove(tmp3, PMVtmpltcstmat[0](lt_g1int_in <S2Eextkind(atstype_int)>)(arg0, arg1)) ;
| ^~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:290:60: error: expected expression before 'atstype_int'
290 | stmat[0](lt_g1int_int<S2Eextkind(atstype_int)>)(arg0, arg1)) ;
| ^~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:290:73: error: expected expression before ')' token
290 | 1int_int<S2Eextkind(atstype_int)>)(arg0, arg1)) ;
| ^
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:301:36: error: 'g0int_mod' undeclared (first use in this function)
301 | SINSmove(tmp5, PMVtmpltcstmat[0](g0int_mod<S2Eextkind(atstype_int)>)(arg0, ATSPMVi0nt(0x8000))) ;
| ^~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:301:57: error: expected expression before 'atstype_int'
301 | ltcstmat[0](g0int_mod<S2Eextkind(atstype_int)>)(arg0, ATSPMVi0nt(0x8000))) ;
| ^~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:301:70: error: expected expression before ')' token
301 | 0int_mod<S2Eextkind(atstype_int)>)(arg0, ATSPMVi0nt(0x8000))) ;
| ^
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:311:36: error: 'g1int_add' undeclared (first use in this function)
311 | SINSmove(tmp6, PMVtmpltcstmat[0](g1int_add<S2Eextkind(atstype_int)>)(arg0, ATSPMVi0nt(1))) ;
| ^~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:311:57: error: expected expression before 'atstype_int'
311 | ltcstmat[0](g1int_add<S2Eextkind(atstype_int)>)(arg0, ATSPMVi0nt(1))) ;
| ^~~~~~~~~~~
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
DATS/hello_dats.c:311:70: error: expected expression before ')' token
311 | 1int_add<S2Eextkind(atstype_int)>)(arg0, ATSPMVi0nt(1))) ;
| ^
/usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
276 | #define ATSINSmove(tmp, val) (tmp = val)
| ^~~
make: *** [<builtin>: DATS/hello_dats.o] Error 1