Created
March 24, 2012 19:40
-
-
Save fepa/2187179 to your computer and use it in GitHub Desktop.
A makefile for gecode projects (created this for the ID2204 course at KTH)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure this makefile if needed then run | |
# $ make all | |
# to compile and link | |
# What files to compile | |
OBJS=money.cpp | |
# What file to compile to | |
MAINFILE=money | |
# What compiler to use | |
CC=g++ | |
# Where is your gecode library? | |
# (Gecode's default 'make install' behavior installs gecode libraries and headers under /usr/local) | |
GECODEDIR=/usr/local | |
# 'make all' does both compiling and link (i.e 'make compile link') | |
all: compile link | |
# 'make compile' compiles files | |
compile: $(OBJS) | |
$(CC) -I$(GECODEDIR)/include -c $(OBJS) | |
# 'make link' links compiled files | |
link: $(OBJS) | |
$(CC) -o $(MAINFILE) -L$(GECODEDIR)/lib $(MAINFILE).o \ | |
-lgecodeflatzinc -lgecodedriver -lgecodegist \ | |
-lgecodesearch -lgecodeminimodel -lgecodeset \ | |
-lgecodeint -lgecodekernel -lgecodesupport \ | |
# 'make clean' cleans up generated files from make commands | |
clean: | |
rm -rf *o $(MAINFILE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment