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/i386;  then mkdir bin/i386;  fi


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


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

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

default: bindir gpipe


