Hi,
I've written a program for statistic analysis that can be found here
http://staff.pubhealth.ku.dk/~ande/web/software/relate.html
I want to make it portable and the program works on unix with the following compilers
sun, intel and gcc
It also compiles on windows with mingw and the intel compiler.
I've installed ms studio,
but I have yet to find a sort of Makefile way of installing the program.
Can anyone give me an advice on how to make the compilation step easier for the end windows user.
Do I have to install cmake to generate an msproject/workspace or whatever it's called?
It seems like an overkill just for 8 compilations and 2 times linking.
I mostly an unix user, and most of the window stuff just puzzles me.
Just the commandpromt. I cant even change the width of this.
So when I type in commands with long dir names it spans over multiple lines.
but also the object files aren't called .o under windows,
so what I do is to compile manually with something like
cl -c myfile.cpp
Has anyone any experience with this?
thanks in advance
btw this is my makefile
CC=g++
C=gcc
#this is the flags used for dev.
flags=-ggdb -Wall -pedantic -ansi
#flags= -O2 -pg
#this is the flag used for prod.
#flags=-O3
all : relateHMM.o relateHMMRun HMMtest
bfgs.o : bfgs.c bfgs.h types.h
$(C) -c -fPIC -std=gnu99 -O2 bfgs.c
alloc.o : alloc.h alloc.cpp types.h
$(CC) -c -fPIC alloc.cpp ${flags}
ld.o : ld.cpp ld.h types.h
$(CC) -c -fPIC ld.cpp ${flags}
asort.o : asort.cpp asort.h types.h alloc.o
$(CC) -c asort.cpp ${flags}
filereader_and_conversions.o : filereader_and_conversions.cpp filereader_and_conversions.h types.h
$(CC) -c filereader_and_conversions.cpp ${flags}
extractors.o : extractors.cpp extractors.h types.h
$(CC) -c extractors.cpp ${flags}
relateHMM.o: relateHMM.cpp relateHMM.h ld.o alloc.o asort.o types.h filereader_and_conversions.o extractors.o
$(CC) -c -fPIC relateHMM.cpp ${flags}
relateHMMRun : relateHMM.o runRelate.cpp relateHMM.o bfgs.o alloc.o ld.o asort.o filereader_and_conversions.o types.h extractors.o
$(CC) -o relateHMM runRelate.cpp asort.o relateHMM.o bfgs.o alloc.o ld.o filereader_and_conversions.o extractors.o ${flags}
HMMtest : HMMtest.cpp alloc.o types.h
$(CC) -o HMMtest HMMtest.cpp alloc.o ${flags}
makeR: HMMld.cpp relateHMM.o bfgs.o ld.o
R CMD SHLIB HMMld.cpp relateHMM.o bfgs.o alloc.o ld.o
clean:
rm -f *.o relateHMM Relate.so HMMtest