annotate Makefile.wiz @ 4866:f42e8db53f78

Added a typedef for the thread function to simplify documentation
author Sam Lantinga <slouken@libsdl.org>
date Sat, 28 Aug 2010 22:56:52 -0700
parents ca5663493497
children
rev   line source
3438
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 # Makefile to build the pandora SDL library
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 WIZSDK = /mythtv/media/devel/toolchains/openwiz/arm-openwiz-linux-gnu
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 AR = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ar
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 RANLIB = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ranlib
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 CC = $(WIZSDK)/bin/arm-openwiz-linux-gnu-gcc
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 CXX = $(WIZSDK)/bin/arm-openwiz-linux-gnu-g++
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 STRIP = $(WIZSDK)/bin/arm-openwiz-linux-gnu-strip
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 TARGET_STATIC = libSDL13.a
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 TARGET_SHARED = libSDL13.so
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 SOURCES = ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c \
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 ./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 ./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18 ./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c ./src/audio/dma/*.c \
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 ./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 ./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 ./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c ./src/cdrom/dummy/*.c \
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 ./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 all: config_copy $(TARGET_STATIC) $(TARGET_SHARED)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 $(TARGET_STATIC): $(OBJECTS)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 $(AR) crv $@ $^
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 $(RANLIB) $@
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 $(TARGET_SHARED):
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 $(CC) -shared -Wl,-soname,$(TARGET_SHARED).0 -o $(TARGET_SHARED).0.0.1 $(OBJECTS)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 ln -s $(TARGET_SHARED).0.0.1 $(TARGET_SHARED).0
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 ln -s $(TARGET_SHARED).0 $(TARGET_SHARED)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 config_copy:
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 cp include/SDL_config_wiz.h include/SDL_config.h
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 clean:
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 rm -f $(TARGET_STATIC) $(TARGET_SHARED)* $(OBJECTS)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 install:
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 mkdir -p $(WIZSDK)/lib
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 mkdir -p $(WIZSDK)/include/SDL13
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 cp -f $(TARGET_STATIC) $(WIZSDK)/lib
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 cp -f $(TARGET_SHARED).0.0.1 $(WIZSDK)/lib
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 rm -f $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0.0.1 $(WIZSDK)/lib/$(TARGET_SHARED).0
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53 cp $(TARGET_STATIC) ../../toolchain/libs
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 cp $(TARGET_SHARED).0.0.1 ../../toolchain/libs
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 rm -f ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 ln -s ../../toolchain/libs/$(TARGET_SHARED).0.0.1 ../../toolchain/libs/$(TARGET_SHARED).0
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57 ln -s ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 cp $(TARGET_SHARED).0.0.1 ../nehe_demos/build/$(TARGET_SHARED).0
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60 cp -f include/*.h $(WIZSDK)/include/SDL13/
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 cp -f include/*.h ../../toolchain/include/SDL13/