Makefile 1.68 KB
Newer Older
1

2
TARGET = shotwell
3

4
# C99 takes care of a warning message generated by the use of Math.round in image_util.vala
5
VALAC_OPTS =--Xcc=-std=c99 -g --enable-checking
6 7 8 9 10 11

SRC_FILES = \
	main.vala \
	AppWindow.vala \
	CollectionPage.vala \
	Thumbnail.vala \
12
	DatabaseTables.vala \
13
	ThumbnailCache.vala \
14
	image_util.vala \
15 16
	CollectionLayout.vala \
	PhotoPage.vala \
17
	Exif.vala \
18 19
	Page.vala \
	ImportPage.vala \
20
	GPhoto.vala \
21
	SortedList.vala \
22 23 24 25
	EventsDirectoryPage.vala \
	Dimensions.vala \
	Box.vala \
	Photo.vala \
26
	Orientation.vala \
27
	util.vala \
Jim Nelson's avatar
Jim Nelson committed
28 29
	BatchImport.vala \
	ExportDialog.vala
30 31
	
VAPI_FILES = \
32
	libexif.vapi \
33 34
	fstream.vapi \
	libgphoto2.vapi
35

36
RESOURCE_FILES = \
37 38
	photo.ui \
	collection.ui \
39 40
	import.ui \
	fullscreen.ui
41 42 43

HEADER_FILES = \
	gphoto.h
44
    
45 46 47
VAPI_DIRS = \
	.

48 49
HEADER_DIRS = \
	.
50

51
LOCAL_PKGS = \
52
	libexif \
53
	fstream \
54
	libgphoto2 \
55 56 57 58 59

EXT_PKGS = \
	gtk+-2.0 \
	sqlite3 \
	vala-1.0 \
60
	hal \
61
	dbus-glib-1 \
62
	unique-1.0
63

64 65
PKGS = $(EXT_PKGS) $(LOCAL_PKGS)

66
all: $(TARGET)
Jim Nelson's avatar
Jim Nelson committed
67 68

clean:
69
	rm -f *.c
70
	rm -f $(TARGET)
Jim Nelson's avatar
Jim Nelson committed
71

72 73 74 75 76 77 78 79 80 81 82 83
install: $(TARGET) shotwell.desktop
	cp $(TARGET) /usr/local/bin
	mkdir -p /usr/local/share/shotwell/icons
	cp icons/* /usr/local/share/shotwell/icons
	$(foreach res,$(RESOURCE_FILES),cp $(res) /usr/local/share/shotwell;)
	cp shotwell.desktop /usr/share/applications

uninstall:
	rm -f /usr/local/bin/$(TARGET)
	rm -fr /usr/local/share/shotwell
	rm -f /usr/share/applications/shotwell.desktop

84
$(TARGET): $(SRC_FILES) $(VAPI_FILES) $(HEADER_FILES) Makefile
85
	pkg-config --print-errors --exists $(EXT_PKGS)
86 87 88 89 90 91
	valac $(VALAC_OPTS) \
	$(foreach pkg,$(PKGS),--pkg=$(pkg)) \
	$(foreach vapidir,$(VAPI_DIRS), --vapidir=$(vapidir)) \
	$(foreach hdir,$(HEADER_DIRS),-X -I$(hdir)) \
	$(SRC_FILES) \
	-o $(TARGET)
Jim Nelson's avatar
Jim Nelson committed
92