29 lines
508 B
Makefile
Raw Normal View History

2013-01-12 14:05:05 +01:00
TARGET := rpng
2015-02-20 21:10:32 +01:00
HAVE_IMLIB2=1
LDFLAGS += -lz
ifeq ($(HAVE_IMLIB2),1)
CFLAGS += -DHAVE_IMLIB2
LDFLAGS += -lImlib2
endif
2013-01-12 14:05:05 +01:00
2015-02-21 02:46:04 +01:00
SOURCES := rpng_decode_fbio.c rpng_decode_fnbio.c rpng_encode.c rpng_test.c ../../file/nbio/nbio_stdio.c
2013-01-12 14:05:05 +01:00
OBJS := $(SOURCES:.c=.o)
2015-02-11 02:32:20 +01:00
CFLAGS += -Wall -pedantic -std=gnu99 -O0 -g -DHAVE_ZLIB -DHAVE_ZLIB_DEFLATE -DRPNG_TEST -I../../include
2013-01-12 14:05:05 +01:00
all: $(TARGET)
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
$(TARGET): $(OBJS)
2015-02-20 21:10:32 +01:00
$(CC) -o $@ $^ $(LDFLAGS)
2013-01-12 14:05:05 +01:00
clean:
rm -f $(TARGET) $(OBJS)
.PHONY: clean