Makefile.wiz
author Steven M. Vascellaro <svascellaro@gmail.com>
Mon, 22 Oct 2018 10:55:18 -0400
changeset 12379 5dc13016cf34
parent 12131 9601849b3079
permissions -rw-r--r--
joystick: Add Linux mappings for "Xbox One Wireless Controller (Model 1708)"

Adds controller bindings to support the "Xbox One Wireless Controller
(Model 1708)" on Linux. The Model 1708 was released in 2016 alongside the
Xbox One S. It is the current model being sold by Microsoft as of writing.
(October 22, 2018)
     1 # Makefile to build the pandora SDL library
     2 WIZSDK = /mythtv/media/devel/toolchains/openwiz/arm-openwiz-linux-gnu
     3 
     4 AR	= $(WIZSDK)/bin/arm-openwiz-linux-gnu-ar
     5 RANLIB	= $(WIZSDK)/bin/arm-openwiz-linux-gnu-ranlib
     6 CC = $(WIZSDK)/bin/arm-openwiz-linux-gnu-gcc
     7 CXX = $(WIZSDK)/bin/arm-openwiz-linux-gnu-g++
     8 STRIP = $(WIZSDK)/bin/arm-openwiz-linux-gnu-strip
     9 
    10 CFLAGS  = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
    11 
    12 TARGET_STATIC  = libSDL2.a
    13 TARGET_SHARED  = libSDL2.so
    14 
    15 SOURCES = \
    16 	./src/*.c \
    17 	./src/audio/*.c \
    18 	./src/audio/disk/*.c \
    19 	./src/audio/dsp/*.c \
    20 	./src/audio/dummy/*.c \
    21 	./src/cpuinfo/*.c \
    22 	./src/events/*.c \
    23 	./src/file/*.c \
    24 	./src/haptic/*.c \
    25 	./src/haptic/linux/*.c \
    26 	./src/joystick/*.c \
    27 	./src/joystick/linux/*.c \
    28 	./src/loadso/dlopen/*.c \
    29 	./src/sensor/*.c \
    30 	./src/sensor/dummy/*.c \
    31 	./src/stdlib/*.c \
    32 	./src/thread/*.c \
    33 	./src/thread/pthread/SDL_syscond.c \
    34 	./src/thread/pthread/SDL_sysmutex.c \
    35 	./src/thread/pthread/SDL_syssem.c \
    36 	./src/thread/pthread/SDL_systhread.c \
    37 	./src/timer/*.c \
    38 	./src/timer/unix/*.c \
    39 	./src/video/*.c \
    40 	./src/video/dummy/*.c \
    41 	./src/video/pandora/*.c \
    42 	
    43 
    44 OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
    45 
    46 all: config_copy $(TARGET_STATIC) $(TARGET_SHARED)
    47 
    48 $(TARGET_STATIC): $(OBJECTS)
    49 	$(AR) crv $@ $^
    50 	$(RANLIB) $@
    51 
    52 $(TARGET_SHARED):
    53 	$(CC) -shared -Wl,-soname,$(TARGET_SHARED).0 -o $(TARGET_SHARED).0.0.1  $(OBJECTS)
    54 	ln -s $(TARGET_SHARED).0.0.1 $(TARGET_SHARED).0
    55 	ln -s $(TARGET_SHARED).0 $(TARGET_SHARED)
    56 
    57 config_copy:
    58 	cp include/SDL_config_wiz.h include/SDL_config.h
    59 
    60 clean:
    61 	rm -f $(TARGET_STATIC) $(TARGET_SHARED)* $(OBJECTS)
    62 
    63 install:
    64 	mkdir -p $(WIZSDK)/lib
    65 	mkdir -p $(WIZSDK)/include/SDL2
    66 	cp -f $(TARGET_STATIC) $(WIZSDK)/lib
    67 	cp -f $(TARGET_SHARED).0.0.1 $(WIZSDK)/lib
    68 	rm -f $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
    69 	ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0.0.1 $(WIZSDK)/lib/$(TARGET_SHARED).0
    70 	ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
    71 
    72 	cp $(TARGET_STATIC) ../../toolchain/libs
    73 	cp $(TARGET_SHARED).0.0.1 ../../toolchain/libs
    74 	rm -f ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
    75 	ln -s ../../toolchain/libs/$(TARGET_SHARED).0.0.1 ../../toolchain/libs/$(TARGET_SHARED).0
    76 	ln -s ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
    77 
    78 	cp $(TARGET_SHARED).0.0.1 ../nehe_demos/build/$(TARGET_SHARED).0
    79 	cp -f include/*.h $(WIZSDK)/include/SDL2/
    80 	cp -f include/*.h ../../toolchain/include/SDL2/