external libs: add missing standalone makefiles (.hgignore was in the way.) SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 10 Nov 2019 11:00:02 +0300
branchSDL-1.2
changeset 74294528168d03e
parent 741 ebb34448a826
child 743 c018b8d5c83e
external libs: add missing standalone makefiles (.hgignore was in the way.)
external/tiff-4.0.3/libtiff/mingw/Makefile
external/zlib-1.2.8/Makefile
external/zlib-1.2.8/contrib/blast/Makefile
external/zlib-1.2.8/contrib/minizip/Makefile
external/zlib-1.2.8/contrib/puff/Makefile
external/zlib-1.2.8/contrib/untgz/Makefile
external/zlib-1.2.8/nintendods/Makefile
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/external/tiff-4.0.3/libtiff/mingw/Makefile	Sun Nov 10 11:00:02 2019 +0300
     1.3 @@ -0,0 +1,68 @@
     1.4 +CROSS	=
     1.5 +CC	= $(CROSS)gcc
     1.6 +
     1.7 +DLLNAME = libtiff-5.dll
     1.8 +LIBNAME = libtiff.dll.a
     1.9 +INCLUDES= -I. -Iexternal/include
    1.10 +CPPFLAGS= -DDLL_EXPORT
    1.11 +CFLAGS	= -O2 -Wall
    1.12 +LDFLAGS = -Wl,--enable-auto-image-base -Wl,--no-undefined
    1.13 +LDLIBS	= -Lexternal/lib -ljpeg -lz
    1.14 +
    1.15 +OBJ =	tif_aux.o \
    1.16 +	tif_close.o \
    1.17 +	tif_codec.o \
    1.18 +	tif_color.o \
    1.19 +	tif_compress.o \
    1.20 +	tif_dir.o \
    1.21 +	tif_dirinfo.o \
    1.22 +	tif_dirread.o \
    1.23 +	tif_dirwrite.o \
    1.24 +	tif_dumpmode.o \
    1.25 +	tif_error.o \
    1.26 +	tif_extension.o \
    1.27 +	tif_fax3.o \
    1.28 +	tif_fax3sm.o \
    1.29 +	tif_flush.o \
    1.30 +	tif_getimage.o \
    1.31 +	tif_jbig.o \
    1.32 +	tif_jpeg.o \
    1.33 +	tif_jpeg_12.o \
    1.34 +	tif_luv.o \
    1.35 +	tif_lzma.o \
    1.36 +	tif_lzw.o \
    1.37 +	tif_next.o \
    1.38 +	tif_ojpeg.o \
    1.39 +	tif_open.o \
    1.40 +	tif_packbits.o \
    1.41 +	tif_pixarlog.o \
    1.42 +	tif_predict.o \
    1.43 +	tif_print.o \
    1.44 +	tif_read.o \
    1.45 +	tif_strip.o \
    1.46 +	tif_swab.o \
    1.47 +	tif_thunder.o \
    1.48 +	tif_tile.o \
    1.49 +	tif_version.o \
    1.50 +	tif_warning.o \
    1.51 +	tif_write.o \
    1.52 +	tif_zip.o \
    1.53 +	tif_win32.o
    1.54 +
    1.55 +all: $(DLLNAME)
    1.56 +
    1.57 +.PHONY: clean distclean
    1.58 +.SUFFIXES:
    1.59 +.SUFFIXES: .o .c
    1.60 +
    1.61 +%.o: ../%.c
    1.62 +	$(CC) -c $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -o $@ $<
    1.63 +
    1.64 +$(DLLNAME): $(OBJ)
    1.65 +	$(CC) -shared -o $(DLLNAME) ../libtiff.def $(OBJ) $(LDFLAGS) $(LDLIBS) \
    1.66 +		-Xlinker --out-implib -Xlinker $(LIBNAME)
    1.67 +
    1.68 +distclean: clean
    1.69 +	$(RM) *.dll *.a
    1.70 +clean:
    1.71 +	$(RM) *.o
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/external/zlib-1.2.8/Makefile	Sun Nov 10 11:00:02 2019 +0300
     2.3 @@ -0,0 +1,5 @@
     2.4 +all:
     2.5 +	-@echo "Please use ./configure first.  Thank you."
     2.6 +
     2.7 +distclean:
     2.8 +	make -f Makefile.in distclean
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/external/zlib-1.2.8/contrib/blast/Makefile	Sun Nov 10 11:00:02 2019 +0300
     3.3 @@ -0,0 +1,8 @@
     3.4 +blast: blast.c blast.h
     3.5 +	cc -DTEST -o blast blast.c
     3.6 +
     3.7 +test: blast
     3.8 +	blast < test.pk | cmp - test.txt
     3.9 +
    3.10 +clean:
    3.11 +	rm -f blast blast.o
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/external/zlib-1.2.8/contrib/minizip/Makefile	Sun Nov 10 11:00:02 2019 +0300
     4.3 @@ -0,0 +1,25 @@
     4.4 +CC=cc
     4.5 +CFLAGS=-O -I../..
     4.6 +
     4.7 +UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
     4.8 +ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
     4.9 +
    4.10 +.c.o:
    4.11 +	$(CC) -c $(CFLAGS) $*.c
    4.12 +
    4.13 +all: miniunz minizip
    4.14 +
    4.15 +miniunz:  $(UNZ_OBJS)
    4.16 +	$(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
    4.17 +
    4.18 +minizip:  $(ZIP_OBJS)
    4.19 +	$(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
    4.20 +
    4.21 +test:	miniunz minizip
    4.22 +	./minizip test readme.txt
    4.23 +	./miniunz -l test.zip
    4.24 +	mv readme.txt readme.old
    4.25 +	./miniunz test.zip
    4.26 +
    4.27 +clean:
    4.28 +	/bin/rm -f *.o *~ minizip miniunz
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/external/zlib-1.2.8/contrib/puff/Makefile	Sun Nov 10 11:00:02 2019 +0300
     5.3 @@ -0,0 +1,42 @@
     5.4 +CFLAGS=-O
     5.5 +
     5.6 +puff: puff.o pufftest.o
     5.7 +
     5.8 +puff.o: puff.h
     5.9 +
    5.10 +pufftest.o: puff.h
    5.11 +
    5.12 +test: puff
    5.13 +	puff zeros.raw
    5.14 +
    5.15 +puft: puff.c puff.h pufftest.o
    5.16 +	cc -fprofile-arcs -ftest-coverage -o puft puff.c pufftest.o
    5.17 +
    5.18 +# puff full coverage test (should say 100%)
    5.19 +cov: puft
    5.20 +	@rm -f *.gcov *.gcda
    5.21 +	@puft -w zeros.raw 2>&1 | cat > /dev/null
    5.22 +	@echo '04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
    5.23 +	@echo '00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
    5.24 +	@echo '00 00 00 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 254
    5.25 +	@echo '00 01 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
    5.26 +	@echo '01 01 00 fe ff 0a' | xxd -r -p | puft -f 2>&1 | cat > /dev/null
    5.27 +	@echo '02 7e ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
    5.28 +	@echo '02' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
    5.29 +	@echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
    5.30 +	@echo '04 80 49 92 24 49 92 24 71 ff ff 93 11 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 249
    5.31 +	@echo '04 c0 81 08 00 00 00 00 20 7f eb 0b 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
    5.32 +	@echo '0b 00 00' | xxd -r -p | puft -f 2>&1 | cat > /dev/null
    5.33 +	@echo '1a 07' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
    5.34 +	@echo '0c c0 81 00 00 00 00 00 90 ff 6b 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 245
    5.35 +	@puft -f zeros.raw 2>&1 | cat > /dev/null
    5.36 +	@echo 'fc 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 253
    5.37 +	@echo '04 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 252
    5.38 +	@echo '04 00 24 49' | xxd -r -p | puft 2> /dev/null || test $$? -eq 251
    5.39 +	@echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 84' | xxd -r -p | puft 2> /dev/null || test $$? -eq 248
    5.40 +	@echo '04 00 24 e9 ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 250
    5.41 +	@echo '04 00 24 e9 ff 6d' | xxd -r -p | puft 2> /dev/null || test $$? -eq 247
    5.42 +	@gcov -n puff.c
    5.43 +
    5.44 +clean:
    5.45 +	rm -f puff puft *.o *.gc*
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/external/zlib-1.2.8/contrib/untgz/Makefile	Sun Nov 10 11:00:02 2019 +0300
     6.3 @@ -0,0 +1,14 @@
     6.4 +CC=cc
     6.5 +CFLAGS=-g
     6.6 +
     6.7 +untgz: untgz.o ../../libz.a
     6.8 +	$(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz
     6.9 +
    6.10 +untgz.o: untgz.c ../../zlib.h
    6.11 +	$(CC) $(CFLAGS) -c -I../.. untgz.c
    6.12 +
    6.13 +../../libz.a:
    6.14 +	cd ../..; ./configure; make
    6.15 +
    6.16 +clean:
    6.17 +	rm -f untgz untgz.o *~
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/external/zlib-1.2.8/nintendods/Makefile	Sun Nov 10 11:00:02 2019 +0300
     7.3 @@ -0,0 +1,126 @@
     7.4 +#---------------------------------------------------------------------------------
     7.5 +.SUFFIXES:
     7.6 +#---------------------------------------------------------------------------------
     7.7 +
     7.8 +ifeq ($(strip $(DEVKITARM)),)
     7.9 +$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
    7.10 +endif
    7.11 +
    7.12 +include $(DEVKITARM)/ds_rules
    7.13 +
    7.14 +#---------------------------------------------------------------------------------
    7.15 +# TARGET is the name of the output
    7.16 +# BUILD is the directory where object files & intermediate files will be placed
    7.17 +# SOURCES is a list of directories containing source code
    7.18 +# DATA is a list of directories containing data files
    7.19 +# INCLUDES is a list of directories containing header files
    7.20 +#---------------------------------------------------------------------------------
    7.21 +TARGET		:=	$(shell basename $(CURDIR))
    7.22 +BUILD		:=	build
    7.23 +SOURCES		:=	../../
    7.24 +DATA		:=	data
    7.25 +INCLUDES	:=	include
    7.26 +
    7.27 +#---------------------------------------------------------------------------------
    7.28 +# options for code generation
    7.29 +#---------------------------------------------------------------------------------
    7.30 +ARCH	:=	-mthumb -mthumb-interwork
    7.31 +
    7.32 +CFLAGS	:=	-Wall -O2\
    7.33 +		-march=armv5te -mtune=arm946e-s \
    7.34 +		-fomit-frame-pointer -ffast-math \
    7.35 +		$(ARCH)
    7.36 +
    7.37 +CFLAGS	+=	$(INCLUDE) -DARM9
    7.38 +CXXFLAGS	:= $(CFLAGS) -fno-rtti -fno-exceptions
    7.39 +
    7.40 +ASFLAGS	:=	$(ARCH) -march=armv5te -mtune=arm946e-s
    7.41 +LDFLAGS	=	-specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
    7.42 +
    7.43 +#---------------------------------------------------------------------------------
    7.44 +# list of directories containing libraries, this must be the top level containing
    7.45 +# include and lib
    7.46 +#---------------------------------------------------------------------------------
    7.47 +LIBDIRS	:=	$(LIBNDS)
    7.48 +
    7.49 +#---------------------------------------------------------------------------------
    7.50 +# no real need to edit anything past this point unless you need to add additional
    7.51 +# rules for different file extensions
    7.52 +#---------------------------------------------------------------------------------
    7.53 +ifneq ($(BUILD),$(notdir $(CURDIR)))
    7.54 +#---------------------------------------------------------------------------------
    7.55 +
    7.56 +export OUTPUT	:=	$(CURDIR)/lib/libz.a
    7.57 +
    7.58 +export VPATH	:=	$(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
    7.59 +			$(foreach dir,$(DATA),$(CURDIR)/$(dir))
    7.60 +
    7.61 +export DEPSDIR	:=	$(CURDIR)/$(BUILD)
    7.62 +
    7.63 +CFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
    7.64 +CPPFILES	:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
    7.65 +SFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
    7.66 +BINFILES	:=	$(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
    7.67 +
    7.68 +#---------------------------------------------------------------------------------
    7.69 +# use CXX for linking C++ projects, CC for standard C
    7.70 +#---------------------------------------------------------------------------------
    7.71 +ifeq ($(strip $(CPPFILES)),)
    7.72 +#---------------------------------------------------------------------------------
    7.73 +	export LD	:=	$(CC)
    7.74 +#---------------------------------------------------------------------------------
    7.75 +else
    7.76 +#---------------------------------------------------------------------------------
    7.77 +	export LD	:=	$(CXX)
    7.78 +#---------------------------------------------------------------------------------
    7.79 +endif
    7.80 +#---------------------------------------------------------------------------------
    7.81 +
    7.82 +export OFILES	:=	$(addsuffix .o,$(BINFILES)) \
    7.83 +			$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
    7.84 +
    7.85 +export INCLUDE	:=	$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
    7.86 +			$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
    7.87 +			-I$(CURDIR)/$(BUILD)
    7.88 +
    7.89 +.PHONY: $(BUILD) clean all
    7.90 +
    7.91 +#---------------------------------------------------------------------------------
    7.92 +all: $(BUILD)
    7.93 +	@[ -d $@ ] || mkdir -p include
    7.94 +	@cp ../../*.h include
    7.95 +
    7.96 +lib:
    7.97 +	@[ -d $@ ] || mkdir -p $@
    7.98 +	
    7.99 +$(BUILD): lib
   7.100 +	@[ -d $@ ] || mkdir -p $@
   7.101 +	@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
   7.102 +
   7.103 +#---------------------------------------------------------------------------------
   7.104 +clean:
   7.105 +	@echo clean ...
   7.106 +	@rm -fr $(BUILD) lib
   7.107 +
   7.108 +#---------------------------------------------------------------------------------
   7.109 +else
   7.110 +
   7.111 +DEPENDS	:=	$(OFILES:.o=.d)
   7.112 +
   7.113 +#---------------------------------------------------------------------------------
   7.114 +# main targets
   7.115 +#---------------------------------------------------------------------------------
   7.116 +$(OUTPUT)	:	$(OFILES)
   7.117 +
   7.118 +#---------------------------------------------------------------------------------
   7.119 +%.bin.o	:	%.bin
   7.120 +#---------------------------------------------------------------------------------
   7.121 +	@echo $(notdir $<)
   7.122 +	@$(bin2o)
   7.123 +
   7.124 +
   7.125 +-include $(DEPENDS)
   7.126 +
   7.127 +#---------------------------------------------------------------------------------------
   7.128 +endif
   7.129 +#---------------------------------------------------------------------------------------