makefile 767 Bytes
Newer Older
Sofus Rose's avatar
Sofus Rose committed
1 2 3 4
#Macros
SHELL = /bin/sh

OBJS = main.o reader.o march.o math.o perlin.o
5
#~ LIBS = openimageio
Sofus Rose's avatar
Sofus Rose committed
6 7

CXXFLAGS = -Wall -fopenmp -std=gnu++11 -O3
Sofus Rose's avatar
Sofus Rose committed
8
CXX = g++
Sofus Rose's avatar
Sofus Rose committed
9

10
#~ LIBS = -lOpenImageIO
Sofus Rose's avatar
Sofus Rose committed
11
LIBS = -lOpenImageIO
Sofus Rose's avatar
Sofus Rose committed
12 13 14 15 16

DATE = $(shell date)

#Main Rules

Sofus Rose's avatar
Sofus Rose committed
17
all: march
Sofus Rose's avatar
Sofus Rose committed
18 19 20 21

clean:
	-rm -f *.o march
	
22 23 24 25 26
#~ clean-deps:
#~ 	-rm -rf libs
	
#~ clean-all: clean clean-deps
	
Sofus Rose's avatar
Sofus Rose committed
27 28 29 30 31 32 33 34 35 36 37 38
install:
	@echo "Not Yet Implemented"
	
debug:
	

#Executables

march: ${OBJS}
	${CXX} ${CXXFLAGS} ${OBJS} ${LIBS} -g -o $@ 
	@echo "Successfully compiled at" ${DATE}
	
39 40 41 42 43 44 45 46 47 48
#Dependencies - gets & compiles

#~ openimageio:
#~ 	mkdir libs
#~ 	git clone https://github.com/OpenImageIO/oiio.git libs/oiio
#~ 	cd libs/oiio
#~ 	git checkout Release-1.6.9
#~ 	make -j9
#~ 	cp build/linux64/
	
Sofus Rose's avatar
Sofus Rose committed
49 50 51 52 53 54

#.cpp.o:
%.o: %.cpp
	${CXX} ${CXXFLAGS} -c $<