qvolray

diff Makefile @ 11:8990b5d2c7fe

moving to qt
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 09 Apr 2012 23:42:57 +0300
parents 6f275934717b
children
line diff
     1.1 --- a/Makefile	Sun Apr 08 14:31:03 2012 +0300
     1.2 +++ b/Makefile	Mon Apr 09 23:42:57 2012 +0300
     1.3 @@ -1,28 +1,228 @@
     1.4 -src = $(wildcard src/*.c)
     1.5 -obj = $(src:.c=.o)
     1.6 -dep = $(obj:.o=.d)
     1.7 -bin = volray
     1.8 +#############################################################################
     1.9 +# Makefile for building: qvolray
    1.10 +# Generated by qmake (2.01a) (Qt 4.7.4) on: Mon Apr 9 23:25:44 2012
    1.11 +# Project:  qvolray.pro
    1.12 +# Template: app
    1.13 +# Command: /usr/bin/qmake -o Makefile qvolray.pro
    1.14 +#############################################################################
    1.15  
    1.16 -CC = gcc
    1.17 -CFLAGS = -pedantic -Wall -g $(incdir)
    1.18 -LDFLAGS = $(libdir) $(libgl) -limago -lvmath -lm
    1.19 +####### Compiler, tools and options
    1.20  
    1.21 -ifeq ($(shell uname -s), Darwin)
    1.22 -	libgl = -framework OpenGL -framework GLUT -lGLEW
    1.23 -	incdir = -I/opt/local/include
    1.24 -	libdir = -L/opt/local/lib
    1.25 -else
    1.26 -	libgl = -lGL -lglut -lGLEW
    1.27 -endif
    1.28 +CC            = gcc
    1.29 +CXX           = g++
    1.30 +DEFINES       = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    1.31 +CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    1.32 +CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    1.33 +INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I. -Isrc -I/usr/X11R6/include -I.
    1.34 +LINK          = g++
    1.35 +LFLAGS        = -Wl,-O1
    1.36 +LIBS          = $(SUBLIBS)  -L/usr/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread 
    1.37 +AR            = ar cqs
    1.38 +RANLIB        = 
    1.39 +QMAKE         = /usr/bin/qmake
    1.40 +TAR           = tar -cf
    1.41 +COMPRESS      = gzip -9f
    1.42 +COPY          = cp -f
    1.43 +SED           = sed
    1.44 +COPY_FILE     = $(COPY)
    1.45 +COPY_DIR      = $(COPY) -r
    1.46 +STRIP         = strip
    1.47 +INSTALL_FILE  = install -m 644 -p
    1.48 +INSTALL_DIR   = $(COPY_DIR)
    1.49 +INSTALL_PROGRAM = install -m 755 -p
    1.50 +DEL_FILE      = rm -f
    1.51 +SYMLINK       = ln -f -s
    1.52 +DEL_DIR       = rmdir
    1.53 +MOVE          = mv -f
    1.54 +CHK_DIR_EXISTS= test -d
    1.55 +MKDIR         = mkdir -p
    1.56  
    1.57 -$(bin): $(obj)
    1.58 -	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.59 +####### Output directory
    1.60  
    1.61 --include $(dep)
    1.62 +OBJECTS_DIR   = ./
    1.63  
    1.64 -%.d: %.c
    1.65 -	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.66 +####### Files
    1.67  
    1.68 -.PHONY: clean
    1.69 -clean:
    1.70 -	rm -f $(obj) $(bin)
    1.71 +SOURCES       = src/main.cc \
    1.72 +		src/sdr.c \
    1.73 +		src/volray.cc \
    1.74 +		src/volume.cc 
    1.75 +OBJECTS       = main.o \
    1.76 +		sdr.o \
    1.77 +		volray.o \
    1.78 +		volume.o
    1.79 +DIST          = /usr/share/qt4/mkspecs/common/g++.conf \
    1.80 +		/usr/share/qt4/mkspecs/common/unix.conf \
    1.81 +		/usr/share/qt4/mkspecs/common/linux.conf \
    1.82 +		/usr/share/qt4/mkspecs/qconfig.pri \
    1.83 +		/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
    1.84 +		/usr/share/qt4/mkspecs/features/qt_functions.prf \
    1.85 +		/usr/share/qt4/mkspecs/features/qt_config.prf \
    1.86 +		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
    1.87 +		/usr/share/qt4/mkspecs/features/default_pre.prf \
    1.88 +		/usr/share/qt4/mkspecs/features/release.prf \
    1.89 +		/usr/share/qt4/mkspecs/features/default_post.prf \
    1.90 +		/usr/share/qt4/mkspecs/features/warn_on.prf \
    1.91 +		/usr/share/qt4/mkspecs/features/qt.prf \
    1.92 +		/usr/share/qt4/mkspecs/features/unix/opengl.prf \
    1.93 +		/usr/share/qt4/mkspecs/features/unix/thread.prf \
    1.94 +		/usr/share/qt4/mkspecs/features/moc.prf \
    1.95 +		/usr/share/qt4/mkspecs/features/resources.prf \
    1.96 +		/usr/share/qt4/mkspecs/features/uic.prf \
    1.97 +		/usr/share/qt4/mkspecs/features/yacc.prf \
    1.98 +		/usr/share/qt4/mkspecs/features/lex.prf \
    1.99 +		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
   1.100 +		qvolray.pro
   1.101 +QMAKE_TARGET  = qvolray
   1.102 +DESTDIR       = 
   1.103 +TARGET        = qvolray
   1.104 +
   1.105 +first: all
   1.106 +####### Implicit rules
   1.107 +
   1.108 +.SUFFIXES: .o .c .cpp .cc .cxx .C
   1.109 +
   1.110 +.cpp.o:
   1.111 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
   1.112 +
   1.113 +.cc.o:
   1.114 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
   1.115 +
   1.116 +.cxx.o:
   1.117 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
   1.118 +
   1.119 +.C.o:
   1.120 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
   1.121 +
   1.122 +.c.o:
   1.123 +	$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
   1.124 +
   1.125 +####### Build rules
   1.126 +
   1.127 +all: Makefile $(TARGET)
   1.128 +
   1.129 +$(TARGET):  $(OBJECTS)  
   1.130 +	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
   1.131 +
   1.132 +Makefile: qvolray.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
   1.133 +		/usr/share/qt4/mkspecs/common/unix.conf \
   1.134 +		/usr/share/qt4/mkspecs/common/linux.conf \
   1.135 +		/usr/share/qt4/mkspecs/qconfig.pri \
   1.136 +		/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
   1.137 +		/usr/share/qt4/mkspecs/features/qt_functions.prf \
   1.138 +		/usr/share/qt4/mkspecs/features/qt_config.prf \
   1.139 +		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
   1.140 +		/usr/share/qt4/mkspecs/features/default_pre.prf \
   1.141 +		/usr/share/qt4/mkspecs/features/release.prf \
   1.142 +		/usr/share/qt4/mkspecs/features/default_post.prf \
   1.143 +		/usr/share/qt4/mkspecs/features/warn_on.prf \
   1.144 +		/usr/share/qt4/mkspecs/features/qt.prf \
   1.145 +		/usr/share/qt4/mkspecs/features/unix/opengl.prf \
   1.146 +		/usr/share/qt4/mkspecs/features/unix/thread.prf \
   1.147 +		/usr/share/qt4/mkspecs/features/moc.prf \
   1.148 +		/usr/share/qt4/mkspecs/features/resources.prf \
   1.149 +		/usr/share/qt4/mkspecs/features/uic.prf \
   1.150 +		/usr/share/qt4/mkspecs/features/yacc.prf \
   1.151 +		/usr/share/qt4/mkspecs/features/lex.prf \
   1.152 +		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
   1.153 +		/usr/lib/libQtOpenGL.prl \
   1.154 +		/usr/lib/libQtGui.prl \
   1.155 +		/usr/lib/libQtCore.prl
   1.156 +	$(QMAKE) -o Makefile qvolray.pro
   1.157 +/usr/share/qt4/mkspecs/common/g++.conf:
   1.158 +/usr/share/qt4/mkspecs/common/unix.conf:
   1.159 +/usr/share/qt4/mkspecs/common/linux.conf:
   1.160 +/usr/share/qt4/mkspecs/qconfig.pri:
   1.161 +/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
   1.162 +/usr/share/qt4/mkspecs/features/qt_functions.prf:
   1.163 +/usr/share/qt4/mkspecs/features/qt_config.prf:
   1.164 +/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
   1.165 +/usr/share/qt4/mkspecs/features/default_pre.prf:
   1.166 +/usr/share/qt4/mkspecs/features/release.prf:
   1.167 +/usr/share/qt4/mkspecs/features/default_post.prf:
   1.168 +/usr/share/qt4/mkspecs/features/warn_on.prf:
   1.169 +/usr/share/qt4/mkspecs/features/qt.prf:
   1.170 +/usr/share/qt4/mkspecs/features/unix/opengl.prf:
   1.171 +/usr/share/qt4/mkspecs/features/unix/thread.prf:
   1.172 +/usr/share/qt4/mkspecs/features/moc.prf:
   1.173 +/usr/share/qt4/mkspecs/features/resources.prf:
   1.174 +/usr/share/qt4/mkspecs/features/uic.prf:
   1.175 +/usr/share/qt4/mkspecs/features/yacc.prf:
   1.176 +/usr/share/qt4/mkspecs/features/lex.prf:
   1.177 +/usr/share/qt4/mkspecs/features/include_source_dir.prf:
   1.178 +/usr/lib/libQtOpenGL.prl:
   1.179 +/usr/lib/libQtGui.prl:
   1.180 +/usr/lib/libQtCore.prl:
   1.181 +qmake:  FORCE
   1.182 +	@$(QMAKE) -o Makefile qvolray.pro
   1.183 +
   1.184 +dist: 
   1.185 +	@$(CHK_DIR_EXISTS) .tmp/qvolray1.0.0 || $(MKDIR) .tmp/qvolray1.0.0 
   1.186 +	$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qvolray1.0.0/ && $(COPY_FILE) --parents src/sdr.h src/volray.h src/volume.h .tmp/qvolray1.0.0/ && $(COPY_FILE) --parents src/main.cc src/sdr.c src/volray.cc src/volume.cc .tmp/qvolray1.0.0/ && (cd `dirname .tmp/qvolray1.0.0` && $(TAR) qvolray1.0.0.tar qvolray1.0.0 && $(COMPRESS) qvolray1.0.0.tar) && $(MOVE) `dirname .tmp/qvolray1.0.0`/qvolray1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qvolray1.0.0
   1.187 +
   1.188 +
   1.189 +clean:compiler_clean 
   1.190 +	-$(DEL_FILE) $(OBJECTS)
   1.191 +	-$(DEL_FILE) *~ core *.core
   1.192 +
   1.193 +
   1.194 +####### Sub-libraries
   1.195 +
   1.196 +distclean: clean
   1.197 +	-$(DEL_FILE) $(TARGET) 
   1.198 +	-$(DEL_FILE) Makefile
   1.199 +
   1.200 +
   1.201 +check: first
   1.202 +
   1.203 +mocclean: compiler_moc_header_clean compiler_moc_source_clean
   1.204 +
   1.205 +mocables: compiler_moc_header_make_all compiler_moc_source_make_all
   1.206 +
   1.207 +compiler_moc_header_make_all:
   1.208 +compiler_moc_header_clean:
   1.209 +compiler_rcc_make_all:
   1.210 +compiler_rcc_clean:
   1.211 +compiler_image_collection_make_all: qmake_image_collection.cpp
   1.212 +compiler_image_collection_clean:
   1.213 +	-$(DEL_FILE) qmake_image_collection.cpp
   1.214 +compiler_moc_source_make_all: main.moc
   1.215 +compiler_moc_source_clean:
   1.216 +	-$(DEL_FILE) main.moc
   1.217 +main.moc: src/volray.h \
   1.218 +		src/main.cc
   1.219 +	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) src/main.cc -o main.moc
   1.220 +
   1.221 +compiler_uic_make_all:
   1.222 +compiler_uic_clean:
   1.223 +compiler_yacc_decl_make_all:
   1.224 +compiler_yacc_decl_clean:
   1.225 +compiler_yacc_impl_make_all:
   1.226 +compiler_yacc_impl_clean:
   1.227 +compiler_lex_make_all:
   1.228 +compiler_lex_clean:
   1.229 +compiler_clean: compiler_moc_source_clean 
   1.230 +
   1.231 +####### Compile
   1.232 +
   1.233 +main.o: src/main.cc src/volray.h
   1.234 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o src/main.cc
   1.235 +
   1.236 +sdr.o: src/sdr.c src/sdr.h
   1.237 +	$(CC) -c $(CFLAGS) $(INCPATH) -o sdr.o src/sdr.c
   1.238 +
   1.239 +volray.o: src/volray.cc src/sdr.h \
   1.240 +		src/volume.h
   1.241 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o volray.o src/volray.cc
   1.242 +
   1.243 +volume.o: src/volume.cc src/volume.h
   1.244 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o volume.o src/volume.cc
   1.245 +
   1.246 +####### Install
   1.247 +
   1.248 +install:   FORCE
   1.249 +
   1.250 +uninstall:   FORCE
   1.251 +
   1.252 +FORCE:
   1.253 +