12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- CC = gcc
- CFLAGS = -Wall -Wextra -ansi -pedantic -I.. -I../libsfn
- ifeq ($(DEBUG),)
- CFLAGS += -O3
- else
- CFLAGS += -g
- endif
- # autodetect configuration
- ifneq ($(USE_DYNDEPS),)
- ifneq ("$(wildcard /usr/local/include/libimagequant.h)","")
- CFLAGS += -DHAS_QUANT=1 -I/usr/local/include
- LIBS += -L/usr/local/lib -limagequant
- else
- ifneq ("$(wildcard /usr/include/libimagequant.h)","")
- CFLAGS += -DHAS_QUANT=1
- LIBS += -limagequant
- endif
- endif
- ifneq ("$(wildcard /usr/local/include/freetype2/ft2build.h)","")
- CFLAGS += -DHAS_FT=1 -I/usr/local/include/freetype2
- LIBS += -L/usr/local/lib -lfreetype
- else
- ifneq ("$(wildcard /usr/include/freetype2/ft2build.h)","")
- CFLAGS += -DHAS_FT=1 -I/usr/include/freetype2
- LIBS += -lfreetype
- endif
- endif
- else
- ifeq ($(TARGET),)
- CFLAGS += -I../libsfn/libimagequant -I../libsfn/freetype2/include -DHAS_QUANT=1 -DHAS_FT=1
- EXTRA += ../libsfn/libimagequant/*.o ../libsfn/freetype2/objs/*.o
- else
- ifneq ("$(wildcard ../libsfn/libimagequant/*.o)","")
- EXTRA += ../libsfn/libimagequant/*.o
- else
- LIBS += -limagequant
- endif
- ifneq ("$(wildcard ../libsfn/freetype2/objs/*.o)","")
- EXTRA += ../libsfn/freetype2/objs/*.o
- else
- LIBS += -lfreetype
- endif
- endif
- endif
|