forked from kornelski/mediancut-posterizer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
32 lines (22 loc) · 819 Bytes
/
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
CC=gcc
CFLAGSOPT ?= -DNDEBUG -O3 -fstrict-aliasing -ffast-math -funroll-loops -fomit-frame-pointer -ffinite-math-only -fno-asynchronous-unwind-tables -flto
INCLUDE ?= -I. -I/usr/local/include/libpng16/ -I/usr/local/include/ -I/usr/include/ -I/usr/X11/include/ -I./include
CFLAGS ?= -Wall -Wno-unknown-pragmas $(INCLUDE) $(CFLAGSOPT)
CFLAGS += -std=c99 $(CFLAGSADD)
LDFLAGS ?= -L/usr/local/lib/ -L/usr/lib/ -L/usr/X11/lib/ -L./lib
LDFLAGS += -lpng -lz $(LDFLAGSADD)
LDFLAGS += -static -s
OBJS=posterize.o blurize.o rwpng.o
COCOA_OBJS = rwpng_cocoa.o
ifdef USE_COCOA
CFLAGS += -DUSE_COCOA=1
OBJS += $(COCOA_OBJS)
FRAMEWORKS += -framework Cocoa
endif
all: posterize
posterize: $(OBJS)
$(CC) $(OBJS) $(LDFLAGS) $(FRAMEWORKS) -o $@
rwpng_cocoa.o: rwpng_cocoa.m
clang -c $(CFLAGS) -o $@ $<
clean:
-rm -f $(OBJS)