Skip to content

Commit

Permalink
[joystick] fix sdl linker flags for the ocaml input2ivy
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Jun 25, 2012
1 parent 1a50d42 commit aed31e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sw/ground_segment/joystick/Makefile
Expand Up @@ -29,7 +29,7 @@ OCAMLLIB = ../../lib/ocaml
TOOLSDIR = ../../tools
OCAMLINCLUDES= -I $(OCAMLLIB) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) -I $(TOOLSDIR)
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
SDLLIB= -L/$(shell sdl-config --prefix)/lib
ML_SDL_LFLAGS = $(foreach u,$(shell sdl-config --libs),-cclib $(u))
INCLUDES += -I `ocamlc -where`

all: test_stick input2ivy
Expand All @@ -38,8 +38,8 @@ test_stick: test_sdl_stick.o
gcc -g -O2 -Wall -DSTICK_DBG `pkg-config glib-2.0 --cflags` -o $@ $^ sdl_stick.c `pkg-config glib-2.0 --libs` -lglibivy `sdl-config --libs`

input2ivy: sdl_stick.o ml_sdl_stick.o input2ivy.cmo
$(OCAMLC) $(OCAMLINCLUDES) -custom -cclib $(SDLLIB) -cclib -lSDL -o $@ unix.cma str.cma glibivy-ocaml.cma xml-light.cma lib-pprz.cma lablgtk.cma $(TOOLSDIR)/fp_proc.cmo $^
$(OCAMLC) $(OCAMLINCLUDES) -o $@ unix.cma str.cma glibivy-ocaml.cma xml-light.cma lib-pprz.cma lablgtk.cma $(TOOLSDIR)/fp_proc.cmo $^ -custom $(ML_SDL_LFLAGS)

%.o : %.c
gcc -c -O2 -Wall `pkg-config glib-2.0 --cflags` $(INCLUDES) $<

Expand Down

0 comments on commit aed31e3

Please sign in to comment.