The C implementation is simple, the problem is with the makefile, https://github.com/wulczer/first_last_agg/issues/2
*some clues?* - - - make Makefile:25: /usr/lib/postgresql/9.5/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory make: *** No rule to make target `/usr/lib/postgresql/9.5/lib/pgxs/src/makefiles/pgxs.mk'. Stop. Using UBUNTU 14 LTS See also https://github.com/wulczer/first_last_agg/blob/master/Makefile