# Makefile for imgsynth
# Author:	Manuel Mausz (0728348)
# Created:	14.04.2009

CC=		g++
LD=		$(CC)
DEBUGFLAGS=
CFLAGS=		-O -ansi -pedantic-errors -Wall $(DEBUGFLAGS)
LDFLAGS=
LIBS=		-lboost_program_options

BIN=		imgsynth
OBJS=		cpixelformat_24.o cbitmap.o cscriptparser.o imgsynth.o
HEADERS=	cpixelformat.h cpixelformat_24.h cfile.h cbitmap.h cscriptparser.h

.SUFFIXES: .cpp .o

all: $(BIN)

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

$(OBJS): $(HEADERS)

$(BIN): $(OBJS)
	$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

debug:
	@$(MAKE) all "DEBUGFLAGS=-DDEBUG -g"

clean:
	rm -f $(OBJS) $(BIN)

run test: all
	@./test/test.sh

.PHONY: clean

# vim600: noet sw=8 ts=8
