## Toplevel Makefile

CC := gcc
CFLAGS := -W -Wall -O3 -I.

VERSION := 1.4
# (note to self: remember to edit loadpng.h as well)

LIB := libldpng.a

all: lib


ifdef DJDIR
include Makefile.dj
else
ifdef MINGDIR
include Makefile.mgw
else
include Makefile.unx
endif
endif

#--------------------------------------------------
.PHONY: lib

lib: $(LIB)

$(LIB): loadpng.o savepng.o regpng.o
	ar rs $@ $^

#--------------------------------------------------
# Note: this requires rm
.PHONY: clean

clean:
	$(RM) loadpng.o savepng.o regpng.o $(LIB) $(SHAREDLIB)
