CC=gcc

modulePath=$(PWD)/../../

common_arg=-fno-inline -fmelt-module-path='$(modulePath)' -fmelt-source-path='$(modulePath)' -fmelt-extra=@$(modulePath)/talpo -O0 -Wall -fmelt-mode=talpo


all: clean test_simple_check_pragma test_simple_check_direct_arg test_simple_check_from_file


test_simple_check_pragma: test_pragma.c
	$(CC) $(common_arg) test_pragma.c -o test.o

test_simple_check_direct_arg: test.c
	$(CC) $(common_arg)  -fmelt-option=talpo-arg='(testNull "fopen")' test.c -o test.o

test_simple_check_from_file: test.c
	$(CC) $(common_arg)  -fmelt-option=talpo-arg-file='option.melt' test.c -o test.o

test_simple_check_debug: test.c
	$(CC) $(common_arg) test.c -o test.o
clean: 
	rm -vf *.so
	rm -vf *.o
	rm -vf *.c.%0*

