#------------------------------------------------------------------------------#
# This makefile was generated by 'cbp2make' tool rev.80                        #
#------------------------------------------------------------------------------#

WRKDIR = `pwd`


CC = gcc
CXX = g++
F77 = f77
F9X = gfortran
LD = g++
AR = ar
RANLIB = ranlib
WINDRES = windres

INC = 
CFLAGS = -Wall -std=c++11 -arch x86_64 -arch arm64
RESINC = 
RCFLAGS = 
LIBDIR = 
LIB = -framework GLUT -framework OpenGL -framework Cocoa
LDFLAGS =

INC_RELEASE = $(INC)
CFLAGS_RELEASE = $(CFLAGS) -O2
RESINC_RELEASE = $(RESINC)
RCFLAGS_RELEASE = $(RCFLAGS)
LIBDIR_RELEASE = $(LIBDIR)
LIB_RELEASE = $(LIB)
LDFLAGS_RELEASE = $(LDFLAGS)
OBJDIR_RELEASE = objs
DEP_RELEASE = 
OUT_RELEASE = ../bin/stlModel

OBJ_RELEASE = $(OBJDIR_RELEASE)/Timer.o $(OBJDIR_RELEASE)/Tokenizer.o $(OBJDIR_RELEASE)/glExtension.o $(OBJDIR_RELEASE)/geomUtils.o $(OBJDIR_RELEASE)/StlModel.o $(OBJDIR_RELEASE)/main.o

all: release

clean: clean_release

before_release: 
	test -d ../bin || mkdir -p ../bin
	test -d $(OBJDIR_RELEASE) || mkdir -p $(OBJDIR_RELEASE)

after_release: 

release: before_release out_release after_release

out_release: before_release $(OBJ_RELEASE) $(DEP_RELEASE)
	$(LD) $(LIBDIR_RELEASE) -o $(OUT_RELEASE) $(OBJ_RELEASE)  $(LDFLAGS_RELEASE) $(LIB_RELEASE)

$(OBJDIR_RELEASE)/Timer.o: Timer.cpp
	$(CXX) $(CFLAGS_RELEASE) $(INC_RELEASE) -c Timer.cpp -o $(OBJDIR_RELEASE)/Timer.o

$(OBJDIR_RELEASE)/Tokenizer.o: Tokenizer.cpp
	$(CXX) $(CFLAGS_RELEASE) $(INC_RELEASE) -c Tokenizer.cpp -o $(OBJDIR_RELEASE)/Tokenizer.o

$(OBJDIR_RELEASE)/glExtension.o: glExtension.cpp
	$(CXX) $(CFLAGS_RELEASE) $(INC_RELEASE) -c glExtension.cpp -o $(OBJDIR_RELEASE)/glExtension.o

$(OBJDIR_RELEASE)/geomUtils.o: geomUtils.cpp
	$(CXX) $(CFLAGS_RELEASE) $(INC_RELEASE) -c geomUtils.cpp -o $(OBJDIR_RELEASE)/geomUtils.o

$(OBJDIR_RELEASE)/StlModel.o: StlModel.cpp
	$(CXX) $(CFLAGS_RELEASE) $(INC_RELEASE) -c StlModel.cpp -o $(OBJDIR_RELEASE)/StlModel.o

$(OBJDIR_RELEASE)/main.o: main.cpp
	$(CXX) $(CFLAGS_RELEASE) $(INC_RELEASE) -c main.cpp -o $(OBJDIR_RELEASE)/main.o

clean_release: 
	rm -f $(OBJ_RELEASE) $(OUT_RELEASE)
	rm -rf ../bin
	rm -rf $(OBJDIR_RELEASE)

.PHONY: before_release after_release clean_release

