File: makefile.win32

package info (click to toggle)
libpano13 2.9.19+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,736 kB
  • ctags: 3,225
  • sloc: ansic: 34,695; sh: 11,214; makefile: 311; perl: 242
file content (95 lines) | stat: -rw-r--r-- 3,305 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
LIBJPEG=$(wildcard ../*jpeg*)
LIBTIFF=$(wildcard ../*tiff*)
LIBZ=$(wildcard ../z*)
LIBPNG=$(wildcard ../*png*)
# note: if you have installed the JAVA SDK somewhere else you need to change
# JAVASDK to point to it.
JAVASDK=$(wildcard ../*sdk*)

LIBS=$(LIBJPEG) $(LIBTIFF) $(LIBZ) $(LIBPNG)

.PHONY: $(LIBS)

all: $(LIBS) pano13.dll

ifeq "$(LIBJPEG)"  ""
$(warning "No jpeg library found - assuming it is already installed")
else
$(LIBJPEG):
	@echo "configuring $@" && cd $@ && ./configure
	@echo "building $@" && cd $@ && make
	@echo "installing $@" && cd $@ && make install-lib
endif

ifeq "$(LIBTIFF)"  ""
$(warning "No tiff library found - assuming it is already installed")
else
$(LIBTIFF):
	@echo "configuring $@" && cd $@ && yes yes | ./configure
	@echo "building $@" && cd $@ && make
	@echo "installing $@" && cd $@ && cp libtiff/*.h /usr/local/include && cp libtiff/*.a /usr/local/lib
endif

ifeq "$(LIBZ)"  ""
$(warning "No zlib library found - assuming it is already installed")
else
$(LIBZ):
	@echo "configuring $@" && cd $@ && ./configure
	@echo "building $@" && cd $@ && make
	@echo "installing $@" && cd $@ && make install
endif

ifeq "$(LIBPNG)"  ""
$(warning "No png library found - assuming it is already installed")
else
$(LIBPNG):
	@echo "configuring $@" && cd $@ && cp scripts/makefile.gcc makefile
	@echo "building $@" && cd $@ && make ZLIBINC=/usr/local/include ZLIBLIB=/usr/local/lib
	@echo "installing $@" && cd $@ && cp *.h /usr/local/include && cp *.a /usr/local/lib
endif

ifeq "$(JAVASDK)" ""
$(warning "No java sdk found - assuming it is already in your include and library paths")
endif

sources = panorama.h filter.h fftn.h f2c.h pteditor.h \
          ptutils.h sys_win.h version.h \
          filter.c parser.c queryfeature.c sys_win.c sys_common.c PTcommon.c ColourBrightness.c correct.c perspect.c \
          adjust.c  remap.c lmdif.c  file.c \
          math.c pan.c PTDialogs.c fftn.c fourier.c resample.c \
          optimize.c morpher.c Triangulate.c \
          seamer.c ptpicker.c pteditor.c seamer_.c \
          tiff.c bmp.c jpeg.c png.c  multilayer.c ZComb.c hdrfile.c rgbe.c\
          Makefile pano13.rc libpano13.def sys_ansi.c ppm.c

objects = filter.o parser.o queryfeature.o sys_common.o PTcommon.o ColourBrightness.o correct.o perspect.o \
          adjust.o  remap.o lmdif.o  file.o math.o pan.o \
          PTDialogs.o fftn.o fourier.o resample.o optimize.o \
          morpher.o Triangulate.o seamer.o ptpicker.o pteditor.o \
          tiff.o jpeg.o png.o multilayer.o ZComb.o hdrfile.o rgbe.o

winobj =  sys_win.o bmp.o pano13rc.o

ansobj =  sys_ansi.o ppm.o

libDirs =  -L/usr/local/lib
incDirs =  -I/usr/local/include -I$(JAVASDK)/include -I$(JAVASDK)/include/win32
CC = gcc -O2 -mms-bitfields $(incDirs)

pano13rc.o  : pano13.rc
	windres  -i pano13.rc -o pano13rc.o

pano13.dll  : $(objects) $(winobj)
	dllwrap --enable-stdcall-fixup -o pano13.dll --def libpano13.def $(objects) $(winobj) $(libDirs) $(incDirs) -lcomdlg32 -ljpeg -ltiff -lpng -lz -mwindows
	strip pano13.dll
	dlltool --dllname pano13.dll --def libpano13.def --output-lib libpano13.a

install  : pano13.dll
	mv pano13.dll C:/WINDOWS/SYSTEM32/pano13.dll

.PHONY : clean
clean :
	-rm -f *.o pano13.dll libpano13.a panosrc.zip

panosrc.zip : $(sources)
	zip -R panosrc.zip $(sources)