#CC			 = mingw32-gcc

OBJS		+= smooth.o

LIBS		+= -L../libdemo
LIBS		+= -ldemo

CFLAGS		+= -I../libdemo/inc
CFLAGS		+= -g
CFLAGS		+= -O0

all: demsmooth.exe

demsmooth.exe: $(OBJS)
	$(CC) $(OBJS) $(LIBS) -o $@

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

.PHONY: run
run: demsmooth.exe
	./demsmooth.exe flyby.dem
	cp -f flyby_processed.dem /cygdrive/c/spel/directq/id1

.PHONY: daz
daz: demsmooth.exe
	./demsmooth.exe flyby1.dem
	./demsmooth.exe flyby2.dem
	cp -f flyby1_processed.dem flyby2_processed.dem /cygdrive/c/spel/directq/id1

.PHONY: clean
clean:
	rm -f *.o demsmooth.exe
