source: trunk/src/testing/app/FileViewer/ImageViewer/Makefile @ 4

Revision 4, 1.7 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

RevLine 
[4]1include ../../../config.mk
2DXT=1   # comment out for no DXT support
3
4SAGE_DIR = ../../..
5
6CFLAGS=$(SAGE_CFLAGS) -I$(SAGE_DIR)/include $(QUANTA_CFLAGS) $(GLEW_CFLAGS) $(GLSL_YUV_DEFINE) $(PORTAUDIO_CFLAGS)
7LIBS+=$(SAGE_LDFLAGS) -L$(SAGE_DIR)/lib -lsail -lz -ljpeg $(QUANTA_LDFLAGS) $(PAUDIO_LIB)
8
9CFLAGS += `Wand-config --cflags --cppflags` -fno-stack-protector
10LIBS += `Wand-config --ldflags --libs` -lpthread
11
12ifeq ($(MACHINE), Darwin)
13        LIBS+= -L/opt/local/lib -lstdc++ -lltdl
14endif
15
16FILES=imageviewer.o
17TARGET=imageviewer
18
19#----------------  BEGIN FastDXT stuff  ----------------#
20ifdef DXT
21#echo "USING DXT"
22FILES+=dxt.o libdxt.o util.o intrinsic.o
23TARGET+=imgToDxt
24CFLAGS+=-DUSE_DXT
25
26OPTIM=1
27
28MACHINE=$(shell uname -s)
29ARCHITECTURE=$(shell uname -p)
30
31ifeq ($(MACHINE), Darwin)
32
33CFLAGS+=-I/opt/local/include
34
35ifeq ($(ARCHITECTURE), i386)
36        # Intel Mac
37
38ifeq ($(OPTIM), 1)
39# MacPro
40CXXFLAGS+=-march=nocona -msse3 -DDXT_INTR
41
42# MacbookPro
43#CFLAGS+=-march=i686 -msse2 -DDXT_INTR
44endif
45
46endif
47
48ifeq ($(ARCHITECTURE), powerpc)
49        # PowerPC Mac
50#echo "Disabling SSE instructions on PowerPC"
51CFLAGS+=
52endif
53endif
54
55ifeq ($(ARCHITECTURE), x86_64)
56        # Opteron
57CFLAGS+=-march=opteron -msse2 -DDXT_INTR
58
59else
60
61        # everything considered i386/linux
62CFLAGS+=-msse2 -DDXT_INTR
63
64endif
65
66
67endif
68#------------------  END FastDXT stuff  -------------------#
69
70
71
72default: $(TARGET)
73
74install: $(TARGET)
75        /bin/cp -f imageviewer $(SAGE_DIR)/bin
76ifdef DXT
77        /bin/cp -f imgToDxt dirToDxt.py $(SAGE_DIR)/bin/fileServer
78endif
79       
80imageviewer: $(FILES)
81        g++ -o imageviewer $(FILES) $(LIBS)
82
83imgToDxt: imgToDxt.o dxt.o libdxt.o util.o intrinsic.o
84        g++ -o imgToDxt imgToDxt.o dxt.o libdxt.o util.o intrinsic.o $(LIBS)
85
86%.o: %.cpp
87        g++ $(CFLAGS) -c -o $@ $<
88
89clean:
90        /bin/rm -f *.o *~ imageviewer imgToDxt
91
Note: See TracBrowser for help on using the repository browser.