* moved libunix to lib/libc or lib/curses
[lightOS.git] / lib / ports / libpng / Makefile
blob4e5c38110f81b12bfa8f8d43a512bc08f92ea3cd
1 ###############################################################################
2 ######### lightOS Makfile ##########
3 ###############################################################################
4 include ../../../Makefile.config
5 include ../../../Makefile.rules
7 .PHONY : get
9 LIBPNG_VERSION= 1.2.35
11 # TODO: Empty file pnggccrd.c pngvcrd.c
12 SRC_C= $(patsubst %,src/%, png.c pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c)
13 OBJ_C= $(SRC_C:src/%.c=$(TMP_LIBPNG)/%.o)
14 INCLUDE= $(LIBC_INCLUDE) $(LIBUNIX_INCLUDE) $(LIBZ_INCLUDE)
16 get:
17 @./get.sh $(LIBPNG_VERSION)
19 dep:
20 @makedepend -f - -D_LIGHTOS_LIBUNIX $(INCLUDE_MAKEDEPEND) $(INCLUDE) $(SRC_C) -p$(TMP_LIBPNG)/ > $(DEP)
22 -include $(DEP)
24 all: get dep $(BUILD)/$(ARCH)/lib/libpng.so
26 $(BUILD)/$(ARCH)/lib/libpng.so: $(OBJ_C)
27 @echo " LD libpng.so"
28 @$(LD) -T $(LIB_LDSCRIPT_C) -shared -o $(BUILD)/$(ARCH)/lib/libpng.so -h/lib/libpng.so $(OBJ_C) $(LIBGCC)
30 $(TMP_LIBPNG)/%.o: src/%.c
31 @echo " C libpng/$(@:$(TMP_LIBPNG)/%.o=src/%.c)"
32 @$(CC) -D_LIGHTOS_LIBUNIX -DPNG_NO_MMX_CODE -DPNG_SETJMP_NOT_SUPPORTED $(LIB_C_FLAGS) $(INCLUDE) -c $(@:$(TMP_LIBPNG)/%.o=src/%.c) -o $(@)
34 clean:
35 @rm -rf libpng-$(LIBPNG_VERSION)
36 @rm -f src $(DEP) $(OBJ_C) $(BUILD)/$(ARCH)/lib/libpng.so