Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

# Makefile for IFMP (static libraries) # ========================================= # directory where you install this library IFMHOME = ${HOME}/IFMP LIBWINDOWHOME = ${IFMHOME}/libwindow LIBRANDOMHOME = ${IFMHOME}/librandom LIBINTHOME = ${IFMHOME}/libinteger # The compiler CXX = g++ # warning options WARNOPT = -Wall -pedantic-errors # flag for libraries LIB_LDFLAG = -L # X11HOME X11HOME = /usr/include/X11 # include path IPATH = -I${LIBWINDOWHOME}/include -I${LIBRANDOMHOME}/include -I${LIBINTHOME}/include -I${X11HOME}/include # lib path LDPATH = ${LIB_LDFLAG}${LIBWINDOWHOME}/lib ${LIB_LDFLAG}${LIBRANDOMHOME}/lib ${LIB_LDFLAG}${LIBINTHOME}/lib ${LIB_LDFLAG}${X11HOME}/lib # compiler flags CXXFLAGS = ${WARNOPT} ${IPATH} -O2 LIBCXXFLAGS = ${CXXFLAGS} -DNDEBUG # Libraries LIBS = ${LDPATH} -lturtle -lwindow -lrandom -linteger -lloaded_dice -lX11 -lm # make targets .PHONY: default default: @echo Please specify target, e.g., \"make app\" to build app from app.cpp or app.C. .PHONY: install install: libwindow libturtle libturtle_ps librandom libloaded_dice libinteger libinstall otherstuff libwindow: ${CXX} -Iinclude ${LIBCXXFLAGS} -c src/window.cpp ar cr lib/libwindow.a window.o rm window.o libturtle: ${CXX} -Iinclude ${LIBCXXFLAGS} -c src/turtle.cpp ar cr lib/libturtle.a turtle.o rm turtle.o libturtle_ps: ${CXX} -Iinclude ${LIBCXXFLAGS} -c src/turtle_ps.cpp ar cr lib/libturtle_ps.a turtle_ps.o rm turtle_ps.o librandom: ${CXX} -Iinclude ${LIBCXXFLAGS} -c src/random.cpp ar cr lib/librandom.a random.o rm random.o libloaded_dice: ${CXX} -Iinclude ${LIBCXXFLAGS} -c src/loaded_dice.cpp ar cr lib/libloaded_dice.a loaded_dice.o rm loaded_dice.o libinteger: ${CXX} -Iinclude ${LIBCXXFLAGS} -c src/integer.cpp ar cr lib/libinteger.a integer.o rm integer.o .PHONY: libinstall libinstall: install -d ${LIBWINDOWHOME} install -d ${LIBRANDOMHOME} install -d ${LIBINTHOME} cp Makefile ${LIBWINDOWHOME} cp Makefile ${LIBRANDOMHOME} cp Makefile ${LIBINTHOME} install -d ${LIBWINDOWHOME}/include install -d ${LIBRANDOMHOME}/include install -d ${LIBINTHOME}/include install -d ${LIBWINDOWHOME}/include/IFM install -d ${LIBRANDOMHOME}/include/IFM install -d ${LIBINTHOME}/include/IFM cp include/graph_icon ${LIBWINDOWHOME}/include cp include/IFM/names include/IFM/turtle include/IFM/window ${LIBWINDOWHOME}/include/IFM cp include/IFM/random.h include/IFM/loaded_dice.h ${LIBRANDOMHOME}/include/IFM cp include/IFM/integer.h ${LIBINTHOME}/include/IFM install -d ${LIBWINDOWHOME}/lib install -d ${LIBRANDOMHOME}/lib install -d ${LIBINTHOME}/lib cp lib/libturtle.a lib/libturtle_ps.a lib/libwindow.a ${LIBWINDOWHOME}/lib cp lib/librandom.a lib/libloaded_dice.a ${LIBRANDOMHOME}/lib cp lib/libinteger.a ${LIBINTHOME}/lib .PHONY: cleanlib cleanlib: rm -rf ./lib/* rm -rf ${IFMHOME} .PHONY: otherstuff otherstuff: cp .emacs ${HOME}/.emacs %: %.cpp ${CXX} ${CXXFLAGS} -o $* $*.cpp ${LIBS} %: %.C ${CXX} ${CXXFLAGS} -o $* $*.C ${LIBS} %: ${CXX} ${CXXFLAGS} -o $* $*.cc ${LIBS}