-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
96 lines (86 loc) · 2.07 KB
/
Makefile
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
96
CC ?= cc
AR ?= ar
RM ?= rm
MKDIR ?= mkdir
INSTALL ?= install
PREFIX ?= /usr/local
JPEG_OBJECTS := turbojpeg/jsimd_none.o \
turbojpeg/jchuff.o \
turbojpeg/jcapimin.o \
turbojpeg/jcapistd.o \
turbojpeg/jccolor.o \
turbojpeg/jcicc.o \
turbojpeg/jccoefct.o \
turbojpeg/jcinit.o \
turbojpeg/jcdctmgr.o \
turbojpeg/jcmainct.o \
turbojpeg/jcmarker.o \
turbojpeg/jcmaster.o \
turbojpeg/jcomapi.o \
turbojpeg/jcparam.o \
turbojpeg/jcphuff.o \
turbojpeg/jcprepct.o \
turbojpeg/jcsample.o \
turbojpeg/jctrans.o \
turbojpeg/jdapimin.o \
turbojpeg/jdapistd.o \
turbojpeg/jdatadst.o \
turbojpeg/jdatasrc.o \
turbojpeg/jdcoefct.o \
turbojpeg/jdcolor.o \
turbojpeg/jddctmgr.o \
turbojpeg/jdhuff.o \
turbojpeg/jdicc.o \
turbojpeg/jdinput.o \
turbojpeg/jdmainct.o \
turbojpeg/jdmarker.o \
turbojpeg/jdmaster.o \
turbojpeg/jdmerge.o \
turbojpeg/jdphuff.o \
turbojpeg/jdpostct.o \
turbojpeg/jdsample.o \
turbojpeg/jdtrans.o \
turbojpeg/jerror.o \
turbojpeg/jfdctflt.o \
turbojpeg/jfdctfst.o \
turbojpeg/jfdctint.o \
turbojpeg/jidctflt.o \
turbojpeg/jidctfst.o \
turbojpeg/jidctint.o \
turbojpeg/jidctred.o \
turbojpeg/jquant1.o \
turbojpeg/jquant2.o \
turbojpeg/jutils.o \
turbojpeg/jmemmgr.o \
turbojpeg/jmemnobs.o \
turbojpeg/jaricom.o \
turbojpeg/jdarith.o \
turbojpeg/jcarith.o \
turbojpeg/turbojpeg.o \
turbojpeg/transupp.o \
turbojpeg/jdatadst-tj.o \
turbojpeg/jdatasrc-tj.o \
turbojpeg/rdbmp.o \
turbojpeg/rdppm.o \
turbojpeg/wrbmp.o \
turbojpeg/wrppm.o
OBJECTS := intensities.o \
jpeg.o \
png.o \
main.o
.PHONY: all clean
all: image-intensities
install: image-intensities
$(INSTALL) image-intensities $(PREFIX)/bin/image-intensities
uninstall:
$(RM) -rf $(PREFIX)/bin/image-intensities
image-intensities: $(OBJECTS) $(JPEG_OBJECTS)
$(CC) $^ -lpng -lmagic -o $@
turbojpeg/%.o: turbojpeg/%.c
$(CC) $< -c -o $@ -O3 -DPPM_SUPPORTED -DBMP_SUPPORTED -Iturbojpeg
%.o: %.c
$(CC) $< -c -o $@ -O3 -Iturbojpeg
clean:
$(RM) -rf $(JPEG_OBJECTS)
$(RM) -rf $(OBJECTS)
$(RM) -rf image-intensities