CC=gcc
CFLAGS = 
INCLUDE =  -I OMCv1.3c/src -I include
OMLIBDIR = OMCv1.3c/src


targets: default

# this target creates a bin-directory
bindir:
	if test ! -d bin;  then mkdir bin;  fi
	if test ! -d bin/x86_64;  then mkdir bin/x86_64;  fi


gpipe: bindir gpipe.o
	$(CC) -o bin/x86_64/gpipe  bin/x86_64/gpipe.o    -L$(OMLIBDIR) -lOM -lm -g


gpipe.o: bindir src/gpipe.c include/gap_tokens.h
	$(CC) -c -o bin/x86_64/gpipe.o src/gpipe.c $(INCLUDE) $(CFLAGS)

clean:
	rm bin/x86_64/*.o bin/x86_64/gpipe

default: bindir gpipe


