CC=gcc
CFLAGS=-I.

%.o: %.c $(DEPS)
	$(CC) -c -o $@ $< $(CFLAGS)

swig: 
	swig -python megatech_crc.i

code: swig
	gcc -fPIC -c megatech_crc.c megatech_crc_wrap.c -I/usr/include/python3.5

lib: code
	ld -shared megatech_crc.o megatech_crc_wrap.o -o _megatech_crc.so

clean:
	rm *.o *.py *.so *_wrap.c *.gch *.out

test:
	gcc -g main.c megatech_crc.h megatech_crc.c