#############################################################################
# Makefile for building: YourGalaxy
# Generated by qmake (2.01a) (Qt 4.8.2) on: Tue Oct 15 21:09:15 2013
# Project:  YourGalaxy
# Template: app
#############################################################################

####### Compiler, tools and options

CC            = gcc
CXX           = g++
DEFINES       = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS        = -m64 -pipe -O3 -Wno-unused-but-set-parameter -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS      = -m64 -pipe -O3 -Wno-unused-but-set-parameter -Wall -W -D_REENTRANT $(DEFINES) -DGL_GLEXT_PROTOTYPES 
#OPENCL        = /opt/AMDAPP
OPENCL        = /usr/local/cuda-11.4/targets/x86_64-linux
INC_OPENCL    = -I$(OPENCL)/include 
INC_GSL       = -I/usr/include/gsl
INC_CLFFT       = -I/usr/local/include
INCPATH       = $(INC_OPENCL) $(INC_GSL) $(INC_CLFFT) -I/usr/share/qt4/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 
LINK          = g++
LFLAGS        = -Wl,-O3
LIBS          = -L/usr/local/lib64 -lclFFT -L/usr/lib -lgsl -lgslcblas -lQtGui -lQtCore -lQtOpenGL -lpthread -lGL -lGLEW -lGLU -L/usr/lib -lpng -L$(OPENCL)/lib -lOpenCL
AR            = ar cqs
QMAKE         = /usr/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = $(COPY)
COPY_DIR      = $(COPY) -r
STRIP         = strip
INSTALL_FILE  = install -m 644 -p
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p

####### Output directory

OBJECTS_DIR   = ./

####### Files

SOURCES       = DiskGal_IC.cpp \
		GLWidget.cpp \
		main.cpp \
		NBody.cpp \
		PlotRotation.cpp \
		qcustomplot.cpp \
		RandomSampling_init.c \
		RandomSampling_pf.c \
		RandomSampling_structure.c \
		RandomSampling_vel.c \
		shaders.cpp \
		Timer.cpp \
		YourGalaxy.cpp moc_DiskGal_IC.cpp \
		moc_GLWidget.cpp \
		moc_PlotRotation.cpp \
		moc_qcustomplot.cpp \
		moc_YourGalaxy.cpp
OBJECTS       = DiskGal_IC.o \
		GLWidget.o \
		main.o \
		NBody.o \
		PlotRotation.o \
		qcustomplot.o \
		RandomSampling_init.o \
		RandomSampling_pf.o \
		RandomSampling_structure.o \
		RandomSampling_vel.o \
		shaders.o \
		Timer.o \
		YourGalaxy.o \
		moc_DiskGal_IC.o \
		moc_GLWidget.o \
		moc_PlotRotation.o \
		moc_qcustomplot.o \
		moc_YourGalaxy.o
DIST          = /usr/share/qt4/mkspecs/common/unix.conf \
		/usr/share/qt4/mkspecs/common/linux.conf \
		/usr/share/qt4/mkspecs/common/gcc-base.conf \
		/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
		/usr/share/qt4/mkspecs/common/g++-base.conf \
		/usr/share/qt4/mkspecs/common/g++-unix.conf \
		/usr/share/qt4/mkspecs/qconfig.pri \
		/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
		/usr/share/qt4/mkspecs/features/qt_functions.prf \
		/usr/share/qt4/mkspecs/features/qt_config.prf \
		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
		/usr/share/qt4/mkspecs/features/default_pre.prf \
		/usr/share/qt4/mkspecs/features/release.prf \
		/usr/share/qt4/mkspecs/features/default_post.prf \
		/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
		/usr/share/qt4/mkspecs/features/warn_on.prf \
		/usr/share/qt4/mkspecs/features/qt.prf \
		/usr/share/qt4/mkspecs/features/unix/thread.prf \
		/usr/share/qt4/mkspecs/features/moc.prf \
		/usr/share/qt4/mkspecs/features/resources.prf \
		/usr/share/qt4/mkspecs/features/uic.prf \
		/usr/share/qt4/mkspecs/features/yacc.prf \
		/usr/share/qt4/mkspecs/features/lex.prf \
		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
QMAKE_TARGET  = YourGalaxy
DESTDIR       = 
TARGET        = YourGalaxy

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.C.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

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

####### Build rules

all: $(TARGET)

$(TARGET): ui_DiskGal_IC.h ui_YourGalaxy.h $(OBJECTS)  
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

dist: 
	@$(CHK_DIR_EXISTS) .tmp/YourGalaxy1.0.0 || $(MKDIR) .tmp/YourGalaxy1.0.0 
	$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/YourGalaxy1.0.0/ && $(COPY_FILE) --parents DiskGal_IC.h GLWidget.hpp NBody.hpp PlotRotation.h qcustomplot.h RandomSampling.h Timer.h YourGalaxy.h .tmp/YourGalaxy1.0.0/ && $(COPY_FILE) --parents DiskGal_IC.cpp GLWidget.cpp main.cpp NBody.cpp PlotRotation.cpp qcustomplot.cpp RandomSampling_init.c RandomSampling_pf.c RandomSampling_structure.c RandomSampling_vel.c shaders.cpp Timer.cpp YourGalaxy.cpp .tmp/YourGalaxy1.0.0/ && $(COPY_FILE) --parents DiskGal_IC.ui YourGalaxy.ui .tmp/YourGalaxy1.0.0/ && (cd `dirname .tmp/YourGalaxy1.0.0` && $(TAR) YourGalaxy1.0.0.tar YourGalaxy1.0.0 && $(COMPRESS) YourGalaxy1.0.0.tar) && $(MOVE) `dirname .tmp/YourGalaxy1.0.0`/YourGalaxy1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/YourGalaxy1.0.0


clean:compiler_clean 
	-$(DEL_FILE) $(OBJECTS)
	-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
	-$(DEL_FILE) $(TARGET) 

check: first

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc_DiskGal_IC.cpp moc_GLWidget.cpp moc_PlotRotation.cpp moc_qcustomplot.cpp moc_YourGalaxy.cpp
compiler_moc_header_clean:
	-$(DEL_FILE) moc_DiskGal_IC.cpp moc_GLWidget.cpp moc_PlotRotation.cpp moc_qcustomplot.cpp moc_YourGalaxy.cpp
moc_DiskGal_IC.cpp: YourGalaxy.h \
		GLWidget.hpp \
		NBody.hpp \
		Timer.h \
		DiskGal_IC.h \
		PlotRotation.h \
		qcustomplot.h \
		DiskGal_IC.h
	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) DiskGal_IC.h -o moc_DiskGal_IC.cpp

moc_GLWidget.cpp: NBody.hpp \
		Timer.h \
		GLWidget.hpp
	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) GLWidget.hpp -o moc_GLWidget.cpp

moc_PlotRotation.cpp: qcustomplot.h \
		PlotRotation.h
	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) PlotRotation.h -o moc_PlotRotation.cpp

moc_qcustomplot.cpp: qcustomplot.h
	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) qcustomplot.h -o moc_qcustomplot.cpp

moc_YourGalaxy.cpp: GLWidget.hpp \
		NBody.hpp \
		Timer.h \
		DiskGal_IC.h \
		YourGalaxy.h \
		PlotRotation.h \
		qcustomplot.h \
		YourGalaxy.h
	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) YourGalaxy.h -o moc_YourGalaxy.cpp

compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
	-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_DiskGal_IC.h ui_YourGalaxy.h
compiler_uic_clean:
	-$(DEL_FILE) ui_DiskGal_IC.h ui_YourGalaxy.h
ui_DiskGal_IC.h: DiskGal_IC.ui
	/usr/bin/uic-qt4 DiskGal_IC.ui -o ui_DiskGal_IC.h

ui_YourGalaxy.h: YourGalaxy.ui
	/usr/bin/uic-qt4 YourGalaxy.ui -o ui_YourGalaxy.h

compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_uic_clean 

####### Compile

DiskGal_IC.o: DiskGal_IC.cpp DiskGal_IC.h \
		YourGalaxy.h \
		GLWidget.hpp \
		NBody.hpp \
		Timer.h \
		PlotRotation.h \
		qcustomplot.h \
		RandomSampling.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DiskGal_IC.o DiskGal_IC.cpp

GLWidget.o: GLWidget.cpp GLWidget.hpp \
		NBody.hpp \
		Timer.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o GLWidget.o GLWidget.cpp

main.o: main.cpp YourGalaxy.h \
		GLWidget.hpp \
		NBody.hpp \
		Timer.h \
		DiskGal_IC.h \
		PlotRotation.h \
		qcustomplot.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp

NBody.o: NBody.cpp NBody.hpp \
		Timer.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o NBody.o NBody.cpp

PlotRotation.o: PlotRotation.cpp PlotRotation.h \
		qcustomplot.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o PlotRotation.o PlotRotation.cpp

qcustomplot.o: qcustomplot.cpp qcustomplot.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qcustomplot.o qcustomplot.cpp

RandomSampling_init.o: RandomSampling_init.c RandomSampling.h
	$(CC) -c $(CFLAGS) $(INCPATH) -o RandomSampling_init.o RandomSampling_init.c

RandomSampling_pf.o: RandomSampling_pf.c RandomSampling.h
	$(CC) -c $(CFLAGS) $(INCPATH) -o RandomSampling_pf.o RandomSampling_pf.c

RandomSampling_structure.o: RandomSampling_structure.c RandomSampling.h
	$(CC) -c $(CFLAGS) $(INCPATH) -o RandomSampling_structure.o RandomSampling_structure.c

RandomSampling_vel.o: RandomSampling_vel.c RandomSampling.h
	$(CC) -c $(CFLAGS) $(INCPATH) -o RandomSampling_vel.o RandomSampling_vel.c

shaders.o: shaders.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o shaders.o shaders.cpp

Timer.o: Timer.cpp Timer.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o Timer.o Timer.cpp

YourGalaxy.o: YourGalaxy.cpp YourGalaxy.h \
		GLWidget.hpp \
		NBody.hpp \
		Timer.h \
		DiskGal_IC.h \
		PlotRotation.h \
		qcustomplot.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o YourGalaxy.o YourGalaxy.cpp

moc_DiskGal_IC.o: moc_DiskGal_IC.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_DiskGal_IC.o moc_DiskGal_IC.cpp

moc_GLWidget.o: moc_GLWidget.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_GLWidget.o moc_GLWidget.cpp

moc_PlotRotation.o: moc_PlotRotation.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_PlotRotation.o moc_PlotRotation.cpp

moc_qcustomplot.o: moc_qcustomplot.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qcustomplot.o moc_qcustomplot.cpp

moc_YourGalaxy.o: moc_YourGalaxy.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_YourGalaxy.o moc_YourGalaxy.cpp

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:

