Makefile.wiz
author Ryan C. Gordon <icculus@icculus.org>
Fri, 12 Aug 2016 19:59:00 -0400
changeset 10266 c09f06c4e8c8
parent 10204 d7a20c257421
permissions -rw-r--r--
emscripten: send fake mouse events for touches, like other targets do. (This really should be handled at the higher level and not in the individual targets, but this fixes the immediate bug.)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
10204
d7a20c257421 Pandora: Updated SDL version in Makefile.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9954
diff changeset
    12
TARGET_STATIC  = libSDL2.a
d7a20c257421 Pandora: Updated SDL version in Makefile.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9954
diff changeset
    13
TARGET_SHARED  = libSDL2.so
3438
ca5663493497 Scott to slouken
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    14
9954
75f31b13bf4b Pandora: Fixed referring to no more existing CD-ROM source files in Makefile.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 5586
diff changeset
    15
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
3438
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 \
5586
7fe92c1dc1d9 Removed /dev/dsp DMA audio target.
Ryan C. Gordon <icculus@icculus.org>
parents: 3438
diff changeset
    18
	./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
3438
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 \
9954
75f31b13bf4b Pandora: Fixed referring to no more existing CD-ROM source files in Makefile.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 5586
diff changeset
    21
	./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
3438
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
10204
d7a20c257421 Pandora: Updated SDL version in Makefile.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9954
diff changeset
    46
	mkdir -p $(WIZSDK)/include/SDL2
3438
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
10204
d7a20c257421 Pandora: Updated SDL version in Makefile.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9954
diff changeset
    60
	cp -f include/*.h $(WIZSDK)/include/SDL2/
d7a20c257421 Pandora: Updated SDL version in Makefile.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9954
diff changeset
    61
	cp -f include/*.h ../../toolchain/include/SDL2/