CC	=	gcc
CFLAGS	=	-Wall -ggdb -pedantic
DIET	=	/opt/diet

LIB	=	src/libulexec.so


all: $(LIB)

$(LIB):
	cd src && make all

test: main.c $(LIB) a.out
	$(CC) $(CFLAGS) -o $@ $< -ldl

a.out:
	$(DIET)/bin/diet -Os gcc -Wall -o a.out test.c

clean: 
	cd src && make clean

distclean:
	@cd src && make distclean
	rm -f a.out test
