1 ###############################################################################
2 ######### lightOS Makfile ##########
3 ###############################################################################
4 include ..
/..
/..
/Makefile.config
5 include ..
/..
/..
/Makefile.rules
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
)
17 @.
/get.sh
$(LIBPNG_VERSION
)
20 @makedepend
-f
- -D_LIGHTOS_LIBUNIX
$(INCLUDE_MAKEDEPEND
) $(INCLUDE
) $(SRC_C
) -p
$(TMP_LIBPNG
)/ > $(DEP
)
24 all: get dep
$(BUILD
)/$(ARCH
)/lib
/libpng.so
26 $(BUILD
)/$(ARCH
)/lib
/libpng.so
: $(OBJ_C
)
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
$(@
)
35 @
rm -rf libpng-
$(LIBPNG_VERSION
)
36 @
rm -f src
$(DEP
) $(OBJ_C
) $(BUILD
)/$(ARCH
)/lib
/libpng.so