test/Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sun, 20 Feb 2011 10:54:44 -0800
changeset 5360 220d3af9121f
parent 5254 f650566b2f51
child 5466 006883d5fa51
permissions -rw-r--r--
Simple rumble API for haptic

Edgar Simo 2011-02-20 10:27:52 PST

Adding patch that adds a simplified API for the haptic subsystem built ontop of
the "real one" for those who want simple rumble without jumping through hoops.

Adds 4 functions:

- extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float
strength, Uint32 length );
- extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);

Also provided is test/testrumble.c which does test this.

This has all been tested on linux and has worked, but due to being built ontop
of the other haptic API it should work on all OS the same.
slouken@1380
     1
# Makefile to build the SDL tests
slouken@1380
     2
slouken@1380
     3
srcdir  = @srcdir@
slouken@1380
     4
slouken@1380
     5
CC      = @CC@
slouken@1380
     6
EXE	= @EXE@
slouken@1380
     7
CFLAGS  = @CFLAGS@
slouken@1380
     8
LIBS	= @LIBS@
slouken@1380
     9
slouken@5232
    10
TARGETS = \
slouken@5232
    11
	checkkeys$(EXE) \
slouken@5232
    12
	graywin$(EXE) \
slouken@5232
    13
	loopwave$(EXE) \
slouken@5232
    14
	testalpha$(EXE) \
slouken@5232
    15
	testatomic$(EXE) \
slouken@5232
    16
	testaudioinfo$(EXE) \
slouken@5232
    17
	testbitmap$(EXE) \
slouken@5232
    18
	testblitspeed$(EXE) \
slouken@5232
    19
	testcursor$(EXE) \
slouken@5232
    20
	testdraw2$(EXE) \
slouken@5232
    21
	testdyngl$(EXE) \
slouken@5232
    22
	testdyngles$(EXE) \
slouken@5232
    23
	testerror$(EXE) \
slouken@5232
    24
	testfile$(EXE) \
slouken@5232
    25
	testfill$(EXE) \
slouken@5232
    26
	testgesture$(EXE) \
slouken@5232
    27
	testgl$(EXE) \
slouken@5232
    28
	testgl2$(EXE) \
slouken@5232
    29
	testgles$(EXE) \
slouken@5232
    30
	testhaptic$(EXE) \
slouken@5360
    31
   testrumble$(EXE) \
slouken@5232
    32
	testhread$(EXE) \
slouken@5232
    33
	testiconv$(EXE) \
slouken@5232
    34
	testime$(EXE) \
slouken@5232
    35
	testintersections$(EXE) \
slouken@5232
    36
	testjoystick$(EXE) \
slouken@5232
    37
	testkeys$(EXE) \
slouken@5232
    38
	testloadso$(EXE) \
slouken@5232
    39
	testlock$(EXE) \
slouken@5232
    40
	testmultiaudio$(EXE) \
slouken@5232
    41
	testoverlay$(EXE) \
slouken@5232
    42
	testoverlay2$(EXE) \
slouken@5232
    43
	testplatform$(EXE) \
slouken@5232
    44
	testpower$(EXE) \
slouken@5232
    45
	testresample$(EXE) \
slouken@5240
    46
	testscale$(EXE) \
slouken@5232
    47
	testsem$(EXE) \
slouken@5232
    48
	testshader$(EXE) \
slouken@5232
    49
	testshape$(EXE) \
slouken@5232
    50
	testsprite$(EXE) \
slouken@5232
    51
	testsprite2$(EXE) \
slouken@5232
    52
	testspriteminimal$(EXE) \
slouken@5254
    53
	teststreaming$(EXE) \
slouken@5232
    54
	testtimer$(EXE) \
slouken@5232
    55
	testver$(EXE) \
slouken@5232
    56
	testvidinfo$(EXE) \
slouken@5232
    57
	testwin$(EXE) \
slouken@5232
    58
	testwm$(EXE) \
slouken@5232
    59
	testwm2$(EXE) \
slouken@5232
    60
	threadwin$(EXE) \
slouken@5232
    61
	torturethread$(EXE) \
slouken@1380
    62
slouken@1914
    63
all: Makefile $(TARGETS)
slouken@1914
    64
slouken@1914
    65
Makefile: $(srcdir)/Makefile.in
slouken@1914
    66
	$(SHELL) config.status $@
slouken@1380
    67
slouken@1380
    68
checkkeys$(EXE): $(srcdir)/checkkeys.c
slouken@1380
    69
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
    70
slouken@1380
    71
graywin$(EXE): $(srcdir)/graywin.c
slouken@1380
    72
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
    73
slouken@1380
    74
loopwave$(EXE): $(srcdir)/loopwave.c
slouken@1380
    75
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
    76
icculus@3017
    77
testresample$(EXE): $(srcdir)/testresample.c
icculus@3017
    78
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
icculus@3017
    79
icculus@2049
    80
testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c
icculus@2049
    81
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
icculus@2049
    82
icculus@2049
    83
testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
icculus@2049
    84
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
icculus@2049
    85
slouken@1380
    86
testalpha$(EXE): $(srcdir)/testalpha.c
slouken@1380
    87
	$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@
slouken@1380
    88
slouken@5254
    89
testatomic$(EXE): $(srcdir)/testatomic.c
slouken@5254
    90
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@5254
    91
slouken@1380
    92
testbitmap$(EXE): $(srcdir)/testbitmap.c
slouken@1380
    93
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
    94
slouken@1380
    95
testblitspeed$(EXE): $(srcdir)/testblitspeed.c
slouken@1380
    96
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
    97
patmandin@1858
    98
testcursor$(EXE): $(srcdir)/testcursor.c
patmandin@1858
    99
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
patmandin@1858
   100
slouken@2994
   101
testintersections$(EXE): $(srcdir)/testintersections.c $(srcdir)/common.c
slouken@2994
   102
	$(CC) -o $@ $(srcdir)/testintersections.c $(srcdir)/common.c $(CFLAGS) $(LIBS)
slouken@2994
   103
slouken@2914
   104
testdraw2$(EXE): $(srcdir)/testdraw2.c $(srcdir)/common.c
slouken@2914
   105
	$(CC) -o $@ $(srcdir)/testdraw2.c $(srcdir)/common.c $(CFLAGS) $(LIBS)
slouken@2914
   106
slouken@1380
   107
testdyngl$(EXE): $(srcdir)/testdyngl.c
slouken@1380
   108
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   109
slouken@3087
   110
testdyngles$(EXE): $(srcdir)/testdyngles.c
slouken@3087
   111
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@3087
   112
slouken@1380
   113
testerror$(EXE): $(srcdir)/testerror.c
slouken@1380
   114
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   115
slouken@1453
   116
testfile$(EXE): $(srcdir)/testfile.c
slouken@1453
   117
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1453
   118
slouken@3576
   119
testfill$(EXE): $(srcdir)/testfill.c
slouken@3576
   120
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@3576
   121
slouken@5254
   122
testgesture$(EXE): $(srcdir)/testgesture.c
slouken@1380
   123
	$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@
slouken@5254
   124
 
slouken@1380
   125
testgl$(EXE): $(srcdir)/testgl.c
slouken@1380
   126
	$(CC) -o $@ $? $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
slouken@1380
   127
slouken@1915
   128
testgl2$(EXE): $(srcdir)/testgl2.c $(srcdir)/common.c
slouken@1915
   129
	$(CC) -o $@ $(srcdir)/testgl2.c $(srcdir)/common.c $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
slouken@1914
   130
slouken@3087
   131
testgles$(EXE): $(srcdir)/testgles.c $(srcdir)/common.c
slouken@3087
   132
	$(CC) -o $@ $(srcdir)/testgles.c $(srcdir)/common.c $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
slouken@3087
   133
slouken@5254
   134
testhaptic$(EXE): $(srcdir)/testhaptic.c
slouken@5254
   135
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@5254
   136
slouken@5360
   137
testrumble$(EXE): $(srcdir)/testrumble.c
slouken@5360
   138
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@5360
   139
slouken@1380
   140
testhread$(EXE): $(srcdir)/testhread.c
slouken@1380
   141
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   142
slouken@1501
   143
testiconv$(EXE): $(srcdir)/testiconv.c
slouken@1501
   144
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1501
   145
slouken@5254
   146
testime$(EXE): $(srcdir)/testime.c
slouken@5254
   147
	$(CC) -o $@ $? $(CFLAGS) $(LIBS) @SDL_TTF_LIB@
slouken@5254
   148
slouken@1380
   149
testjoystick$(EXE): $(srcdir)/testjoystick.c
slouken@1380
   150
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   151
slouken@1380
   152
testkeys$(EXE): $(srcdir)/testkeys.c
slouken@1380
   153
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   154
slouken@5254
   155
testloadso$(EXE): $(srcdir)/testloadso.c
slouken@5254
   156
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@5254
   157
slouken@1380
   158
testlock$(EXE): $(srcdir)/testlock.c
slouken@1380
   159
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   160
slouken@1380
   161
testoverlay2$(EXE): $(srcdir)/testoverlay2.c
slouken@1380
   162
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   163
slouken@1380
   164
testoverlay$(EXE): $(srcdir)/testoverlay.c
slouken@1380
   165
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   166
slouken@1421
   167
testplatform$(EXE): $(srcdir)/testplatform.c
slouken@1421
   168
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1421
   169
slouken@5254
   170
testpower$(EXE): $(srcdir)/testpower.c
slouken@5254
   171
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@5254
   172
slouken@5240
   173
testscale$(EXE): $(srcdir)/testscale.c $(srcdir)/common.c
slouken@5240
   174
	$(CC) -o $@ $(srcdir)/testscale.c $(srcdir)/common.c $(CFLAGS) $(LIBS)
slouken@5240
   175
slouken@1380
   176
testsem$(EXE): $(srcdir)/testsem.c
slouken@1380
   177
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   178
slouken@5232
   179
testshader$(EXE): $(srcdir)/testshader.c
slouken@5232
   180
	$(CC) -o $@ $(srcdir)/testshader.c $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
slouken@5232
   181
eligottlieb@4799
   182
testshape$(EXE): $(srcdir)/testshape.c
eligottlieb@4799
   183
	$(CC) -o $@ $? -std=c99 $(CFLAGS) $(LIBS)
eligottlieb@4799
   184
slouken@1380
   185
testsprite$(EXE): $(srcdir)/testsprite.c
slouken@1380
   186
	$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@
slouken@1380
   187
slouken@1914
   188
testsprite2$(EXE): $(srcdir)/testsprite2.c $(srcdir)/common.c
slouken@1914
   189
	$(CC) -o $@ $(srcdir)/testsprite2.c $(srcdir)/common.c $(CFLAGS) $(LIBS) @MATHLIB@
slouken@1895
   190
slouken@5254
   191
testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c
slouken@5254
   192
	$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@
slouken@5254
   193
slouken@5254
   194
teststreaming$(EXE): $(srcdir)/teststreaming.c
slouken@5254
   195
	$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@
slouken@5254
   196
slouken@1380
   197
testtimer$(EXE): $(srcdir)/testtimer.c
slouken@1380
   198
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   199
slouken@1380
   200
testver$(EXE): $(srcdir)/testver.c
slouken@1380
   201
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   202
slouken@1380
   203
testvidinfo$(EXE): $(srcdir)/testvidinfo.c
slouken@1380
   204
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   205
slouken@1380
   206
testwin$(EXE): $(srcdir)/testwin.c
slouken@1380
   207
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   208
slouken@1380
   209
testwm$(EXE): $(srcdir)/testwm.c
slouken@1380
   210
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   211
slouken@1933
   212
testwm2$(EXE): $(srcdir)/testwm2.c $(srcdir)/common.c
slouken@1933
   213
	$(CC) -o $@ $(srcdir)/testwm2.c $(srcdir)/common.c $(CFLAGS) $(LIBS)
slouken@1895
   214
slouken@1380
   215
threadwin$(EXE): $(srcdir)/threadwin.c
slouken@1380
   216
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   217
slouken@1380
   218
torturethread$(EXE): $(srcdir)/torturethread.c
slouken@1380
   219
	$(CC) -o $@ $? $(CFLAGS) $(LIBS)
slouken@1380
   220
slouken@1380
   221
clean:
slouken@1380
   222
	rm -f $(TARGETS)
slouken@1380
   223
slouken@1380
   224
distclean: clean
slouken@1380
   225
	rm -f Makefile
slouken@1380
   226
	rm -f config.status config.cache config.log
slouken@1380
   227
	rm -rf $(srcdir)/autom4te*