Makefile.wiz
changeset 3438 ca5663493497
child 5586 7fe92c1dc1d9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile.wiz	Tue Nov 17 04:53:15 2009 +0000
     1.3 @@ -0,0 +1,61 @@
     1.4 +# Makefile to build the pandora SDL library
     1.5 +WIZSDK = /mythtv/media/devel/toolchains/openwiz/arm-openwiz-linux-gnu
     1.6 +
     1.7 +AR	= $(WIZSDK)/bin/arm-openwiz-linux-gnu-ar
     1.8 +RANLIB	= $(WIZSDK)/bin/arm-openwiz-linux-gnu-ranlib
     1.9 +CC = $(WIZSDK)/bin/arm-openwiz-linux-gnu-gcc
    1.10 +CXX = $(WIZSDK)/bin/arm-openwiz-linux-gnu-g++
    1.11 +STRIP = $(WIZSDK)/bin/arm-openwiz-linux-gnu-strip
    1.12 +
    1.13 +CFLAGS  = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
    1.14 +
    1.15 +TARGET_STATIC  = libSDL13.a
    1.16 +TARGET_SHARED  = libSDL13.so
    1.17 +
    1.18 +SOURCES = ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c \
    1.19 +	./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
    1.20 +	./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
    1.21 +	./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c ./src/audio/dma/*.c \
    1.22 +	./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
    1.23 +	./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
    1.24 +	./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c ./src/cdrom/dummy/*.c \
    1.25 +	./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o
    1.26 +	
    1.27 +
    1.28 +OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
    1.29 +
    1.30 +all: config_copy $(TARGET_STATIC) $(TARGET_SHARED)
    1.31 +
    1.32 +$(TARGET_STATIC): $(OBJECTS)
    1.33 +	$(AR) crv $@ $^
    1.34 +	$(RANLIB) $@
    1.35 +
    1.36 +$(TARGET_SHARED):
    1.37 +	$(CC) -shared -Wl,-soname,$(TARGET_SHARED).0 -o $(TARGET_SHARED).0.0.1  $(OBJECTS)
    1.38 +	ln -s $(TARGET_SHARED).0.0.1 $(TARGET_SHARED).0
    1.39 +	ln -s $(TARGET_SHARED).0 $(TARGET_SHARED)
    1.40 +
    1.41 +config_copy:
    1.42 +	cp include/SDL_config_wiz.h include/SDL_config.h
    1.43 +
    1.44 +clean:
    1.45 +	rm -f $(TARGET_STATIC) $(TARGET_SHARED)* $(OBJECTS)
    1.46 +
    1.47 +install:
    1.48 +	mkdir -p $(WIZSDK)/lib
    1.49 +	mkdir -p $(WIZSDK)/include/SDL13
    1.50 +	cp -f $(TARGET_STATIC) $(WIZSDK)/lib
    1.51 +	cp -f $(TARGET_SHARED).0.0.1 $(WIZSDK)/lib
    1.52 +	rm -f $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
    1.53 +	ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0.0.1 $(WIZSDK)/lib/$(TARGET_SHARED).0
    1.54 +	ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
    1.55 +
    1.56 +	cp $(TARGET_STATIC) ../../toolchain/libs
    1.57 +	cp $(TARGET_SHARED).0.0.1 ../../toolchain/libs
    1.58 +	rm -f ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
    1.59 +	ln -s ../../toolchain/libs/$(TARGET_SHARED).0.0.1 ../../toolchain/libs/$(TARGET_SHARED).0
    1.60 +	ln -s ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
    1.61 +
    1.62 +	cp $(TARGET_SHARED).0.0.1 ../nehe_demos/build/$(TARGET_SHARED).0
    1.63 +	cp -f include/*.h $(WIZSDK)/include/SDL13/
    1.64 +	cp -f include/*.h ../../toolchain/include/SDL13/