-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.bak
54 lines (33 loc) · 1.19 KB
/
Makefile.bak
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
WAND_CFG=/usr/bin/MagickWand-config
DEFS=-DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
#LIBS=-lMagickWand-6.Q16 -lMagickCore-6.Q16
#LIBS=-lMagickCore-6.Q16
# need to set libs to /usr/sbin/bin/MagickWand-config --libs
#LIBS=-L/usr/sbin/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16
#LIBS=-L/usr/sbin/lib -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
#LIBS=`/usr/sbin/bin/MagickWand-config --libs`
LIBS=`$(WAND_CFG) --libs`
#centos
#LIBDIR=/usr/lib64/libMagickCore-6.Q16.so
#LIBDIR=/usr/sbin/lib/libMagickCore-6.Q16.so
LIBDIR=
#ubuntu
#LIBDIR=/usr/local/lib/libMagickCore-6.Q16.so
#LIBDIR=/usr/local/lib/
.SUFFIXES:
# /usr/sbin/bin/MagickWand-config --cflags
#CFLAGS=-I/usr/local/include/ImageMagick-7 -g -O2 -Wall -c $(DEFS)
#CFLAGS=-I/usr/include -I/usr/include/ImageMagick-6 -I/usr/local/include/ImageMagick-6 -g -O2 -Wall -c $(DEFS)
# CFLAGS=`/usr/sbin/bin/MagickWand-config --cflags`
CFLAGS=`$(WAND_CFG) --cflags`
OBJDIR=obj
BINDIR=bin
$(OBJDIR)/%.o: %.c
$(CC) $(CFLAGS) -c $^ -o $@
%: $(OBJDIR)/%.o
gcc -L$(LIBDIR) -g -Wl,-rpath=/usr/sbin/lib -o $@ $< $(LIBS)
# gcc -L$(LIBDIR) -g -Wl,-rpath=/usr/local/lib -o $@ $< $(LIBS)
.PHONY : clean
clean:
rm -f $(OBJDIR)/*.o
all: $(BINDIR)/%