clean up build process a bit

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@40 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
halleyscometsw 2008-03-10 19:20:40 +00:00
parent da83dc6b13
commit 4aec626083
3 changed files with 60 additions and 10 deletions

34
src/Makefile Normal file
View File

@ -0,0 +1,34 @@
CODING_OBJS=coding/adx_decoder.o \
coding/g721_decoder.o \
coding/ima_decoder.o \
coding/ngc_afc_decoder.o \
coding/ngc_dsp_decoder.o \
coding/ngc_dtk_decoder.o \
coding/pcm_decoder.o
LAYOUT_OBJS=layout/ast_blocked.o \
layout/blocked.o \
layout/halpst_blocked.o \
layout/interleave.o \
layout/nolayout.o
META_OBJS=meta/adx_header.o \
meta/afc_header.o \
meta/agsc.o \
meta/ast.o \
meta/brstm.o \
meta/halpst.o \
meta/nds_strm.o \
meta/ngc_adpdtk.o \
meta/rsf.o
OBJECTS=vgmstream.o streamfile.o util.o $(CODING_OBJS) $(LAYOUT_OBJS) $(META_OBJS)
libvgmstream.a: $(OBJECTS)
$(AR) crsv libvgmstream.a $(OBJECTS)
vgmstream-deps:
$(CC) $(CFLAGS) -M -o vgmstream-deps
clean:
rm -f $(OBJECTS) libvgmstream.a

View File

@ -1,14 +1,14 @@
SHELL = /bin/sh
CFLAGS=-lm -Wall -O3
export SHELL = /bin/sh
export CFLAGS=-Wall -O3
export LDFLAGS=-lm -L../src -lvgmstream
VGMSTREAMFILES = ../src/streamfile.c ../src/vgmstream.c ../src/util.c ../src/meta/adx_header.c ../src/coding/adx_decoder.c ../src/coding/ngc_dsp_decoder.c ../src/meta/brstm.c ../src/layout/interleave.c ../src/layout/nolayout.c ../src/coding/pcm_decoder.c ../src/meta/nds_strm.c ../src/coding/ima_decoder.c ../src/meta/agsc.c ../src/meta/ngc_adpdtk.c ../src/coding/ngc_dtk_decoder.c ../src/coding/g721_decoder.c ../src/meta/rsf.c ../src/meta/afc_header.c ../src/coding/ngc_afc_decoder.c ../src/meta/ast.c ../src/layout/ast_blocked.c ../src/layout/halpst_blocked.c ../src/layout/blocked.c ../src/meta/halpst.c
.PHONY: libvgmstream.a
test: test.c $(VGMSTREAMFILES)
gcc $(CFLAGS) test.c $(VGMSTREAMFILES) -o test
strip test
test: libvgmstream.a
$(CC) $(CFLAGS) test.c $(LDFLAGS) -o test
libvgmstream.a:
$(MAKE) -C ../src libvgmstream.a
test.exe: test.c $(VGMSTREAMFILES)
i586-mingw32msvc-gcc $(CFLAGS) test.c $(VGMSTREAMFILES) -o test.exe
i586-mingw32msvc-strip test.exe
clean:
rm -f test test.exe
rm -f test

16
test/Makefile.mingw Normal file
View File

@ -0,0 +1,16 @@
export SHELL = /bin/sh
export CFLAGS=-Wall -O3
export LDFLAGS=-lm -L../src -lvgmstream
export CC=i586-mingw32msvc-gcc
export AR=i586-mingw32msvc-ar
.PHONY: libvgmstream.a
test.exe: libvgmstream.a
$(CC) $(CFLAGS) test.c $(LDFLAGS) -o test.exe
libvgmstream.a:
$(MAKE) -C ../src libvgmstream.a
clean:
rm -f test.exe