all: pam_foreground.so check-foreground-console

check-foreground-console: check-foreground-console.c
	gcc -O0 -g -Wall -o check-foreground-console check-foreground-console.c

pam_foreground.so: pam_foreground.c
	gcc -fPIC -O2 -Wall -c pam_foreground.c
	ld -lpam -x --shared -o pam_foreground.so pam_foreground.o -lpam -lc
clean:
	- rm *.o *.so check-foreground-console

