diff --git a/conf/Makefile.avr b/conf/Makefile.avr index 7f38e698cd..d41e912025 100644 --- a/conf/Makefile.avr +++ b/conf/Makefile.avr @@ -28,7 +28,7 @@ # ATMELBIN = /usr/bin -ATMEL_INCLUDES = -I /usr/avr/include +ATMEL_INCLUDES = -I/usr/avr/include ATMEL_LIBPATH = -B /usr/avr/lib/avr4 -B /usr/avr/lib/avr5 PROG_PORT = /dev/parport0 diff --git a/conf/Makefile.lpc21 b/conf/Makefile.lpc21 index eca613941d..10bde6f0b5 100644 --- a/conf/Makefile.lpc21 +++ b/conf/Makefile.lpc21 @@ -115,7 +115,7 @@ OPT = s CSTANDARD = -std=gnu99 -CINCS = $(INCLUDES) -I $(SRC_ARCH)/include +CINCS = $(INCLUDES) -I$(SRC_ARCH)/include # Compiler flags. CFLAGS = $(CINCS) diff --git a/conf/Makefile.sim b/conf/Makefile.sim index 8097438bdf..3d14d0909d 100644 --- a/conf/Makefile.sim +++ b/conf/Makefile.sim @@ -35,7 +35,7 @@ CC = g++ endif OCAMLC = ocamlc SIMDIR = $(PAPARAZZI_SRC)/sw/simulator -CAMLINCLUDES = $(shell ocamlfind query -r -i-format lablgtk2) -I $(PAPARAZZI_SRC)/sw/lib/ocaml -I $(SIMDIR) $(shell ocamlfind query -r -i-format xml-light) +CAMLINCLUDES = $(shell ocamlfind query -r -i-format lablgtk2) -I$(PAPARAZZI_SRC)/sw/lib/ocaml -I$(SIMDIR) $(shell ocamlfind query -r -i-format xml-light) SIMSITLML = $(OBJDIR)/simsitl.ml MYGTKINITCMO = myGtkInit.cmo SITLCMA = $(SIMDIR)/sitl.cma @@ -48,7 +48,7 @@ Q=@ # ifneq ($(SIM_TYPE),JSBSIM) -INCLUDES += -I `ocamlc -where` +INCLUDES += -I`ocamlc -where` endif CFLAGS = -W -Wall diff --git a/conf/autopilot/lisa_passthrough.makefile b/conf/autopilot/lisa_passthrough.makefile index e4e7b33704..ba69c752b7 100644 --- a/conf/autopilot/lisa_passthrough.makefile +++ b/conf/autopilot/lisa_passthrough.makefile @@ -95,7 +95,7 @@ stm_passthrough.CFLAGS += -DUSE_I2C2 stm_passthrough.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c # Vanes -stm_passthrough.CFLAGS += -I $(SRC_CSC) +stm_passthrough.CFLAGS += -I$(SRC_CSC) stm_passthrough.CFLAGS += -DUSE_CAN1 \ -DUSE_CAN1 \ -DUSE_USB_LP_CAN1_RX0_IRQ \ diff --git a/conf/autopilot/logger.makefile b/conf/autopilot/logger.makefile index aba1b64c0c..77cb83caf4 100644 --- a/conf/autopilot/logger.makefile +++ b/conf/autopilot/logger.makefile @@ -54,7 +54,7 @@ ap.CFLAGS += -DHW_ENDPOINT_LPC2000_SPINUM=$(SPI_CHANNEL) ap.CFLAGS += -DUSE_USB_HIGH_PCLK #efsl -ap.CFLAGS += -I $(SRC_ARCH)/efsl/inc -I $(SRC_ARCH)/efsl/conf +ap.CFLAGS += -I$(SRC_ARCH)/efsl/inc -I$(SRC_ARCH)/efsl/conf ap.srcs += $(SRC_ARCH)/efsl/src/efs.c $(SRC_ARCH)/efsl/src/plibc.c ap.srcs += $(SRC_ARCH)/efsl/src/disc.c $(SRC_ARCH)/efsl/src/partition.c @@ -69,7 +69,7 @@ ap.srcs += $(SRC_ARCH)/efsl/src/interfaces/sd.c #usb mass storage ap.CFLAGS += -DUSE_USB_MSC -ap.CFLAGS += -I $(SRC_ARCH)/lpcusb -I $(SRC_ARCH)/lpcusb/examples +ap.CFLAGS += -I$(SRC_ARCH)/lpcusb -I$(SRC_ARCH)/lpcusb/examples ap.srcs += $(SRC_ARCH)/usb_msc_hw.c ap.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c diff --git a/sw/airborne/Makefile b/sw/airborne/Makefile index f969cc7499..128493f2f8 100644 --- a/sw/airborne/Makefile +++ b/sw/airborne/Makefile @@ -26,7 +26,7 @@ OBJDIR = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)/$(TARGET) VARINCLUDE=$(PAPARAZZI_HOME)/var/include ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT) -INCLUDES = -I $(PAPARAZZI_SRC)/sw/include -I $(PAPARAZZI_SRC)/sw/airborne -I $(PAPARAZZI_SRC)/conf/autopilot -I $(PAPARAZZI_SRC)/sw/airborne/arch/$($(TARGET).ARCHDIR) -I $(VARINCLUDE) -I $(ACINCLUDE) +INCLUDES = -I$(PAPARAZZI_SRC)/sw/include -I$(PAPARAZZI_SRC)/sw/airborne -I$(PAPARAZZI_SRC)/conf/autopilot -I$(PAPARAZZI_SRC)/sw/airborne/arch/$($(TARGET).ARCHDIR) -I$(VARINCLUDE) -I$(ACINCLUDE) ifneq ($(MAKECMDGOALS),clean) diff --git a/sw/airborne/booz/test/Makefile b/sw/airborne/booz/test/Makefile index b8295c800e..6db259e69e 100644 --- a/sw/airborne/booz/test/Makefile +++ b/sw/airborne/booz/test/Makefile @@ -22,7 +22,7 @@ ## CC = gcc -CFLAGS = -std=gnu99 -Wall -I.. -I../.. -I../../test/ -I../../../include -I ../../booz_priv +CFLAGS = -std=gnu99 -Wall -I.. -I../.. -I../../test/ -I../../../include -I../../booz_priv LDFLAGS = -lm CFLAGS += -I../../../../var/BOOZ2_A1P @@ -47,8 +47,8 @@ TEST_ATT_CFLAGS = -DSTABILISATION_ATTITUDE_TYPE_INT \ -DSTABILISATION_ATTITUDE_REF_H=\"stabilization/booz_stabilization_attitude_ref_quat_int.h\" test_att_ref: test_att_ref.c ../stabilization/booz_stabilization_attitude_ref_quat_int.c - $(CC) $(CFLAGS) $(TEST_ATT_CFLAGS) -I /home/poine/work/savannah/paparazzi3/trunk/var/BOOZ2_A1 -o $@ $^ $(LDFLAGS) + $(CC) $(CFLAGS) $(TEST_ATT_CFLAGS) -I/home/poine/work/savannah/paparazzi3/trunk/var/BOOZ2_A1 -o $@ $^ $(LDFLAGS) clean: - rm -f *~ test_att_ref \ No newline at end of file + rm -f *~ test_att_ref diff --git a/sw/airborne/math/Makefile b/sw/airborne/math/Makefile index 782cfb0b30..7030d668bf 100644 --- a/sw/airborne/math/Makefile +++ b/sw/airborne/math/Makefile @@ -3,7 +3,7 @@ CC= gcc CFLAGS= -fpic -INCLUDES= -I $(PAPARAZZI_SRC)/sw/include -I $(PAPARAZZI_SRC)/sw/airborne +INCLUDES= -I$(PAPARAZZI_SRC)/sw/include -I$(PAPARAZZI_SRC)/sw/airborne # build in ../../../var/build/math ifndef BUILDDIR diff --git a/sw/ground_segment/joystick/Makefile b/sw/ground_segment/joystick/Makefile index 54c8459665..273bf396e4 100644 --- a/sw/ground_segment/joystick/Makefile +++ b/sw/ground_segment/joystick/Makefile @@ -26,7 +26,7 @@ Q=@ OCAMLC = ocamlc 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) +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 all: test_stick input2ivy diff --git a/sw/ground_segment/lpc21iap/Makefile b/sw/ground_segment/lpc21iap/Makefile index 5a0eacc199..287b26de98 100644 --- a/sw/ground_segment/lpc21iap/Makefile +++ b/sw/ground_segment/lpc21iap/Makefile @@ -28,7 +28,7 @@ endif UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") LIBRARYS = $(shell if test -d /opt/local/lib; then echo "-L/opt/local/lib"; elif test -d /opt/paparazzi/lib; then echo "-L/opt/paparazzi/lib"; fi) - INCLUDES = $(shell if test -d /opt/local/include; then echo "-I /opt/local/include"; elif test -d /opt/paparazzi/include; then echo "-I /opt/paparazzi/include"; fi) + INCLUDES = $(shell if test -d /opt/local/include; then echo "-I/opt/local/include"; elif test -d /opt/paparazzi/include; then echo "-I/opt/paparazzi/include"; fi) endif CFLAGS = -Wall -g $(FPIC) $(INCLUDES) $(LIBRARYS) diff --git a/sw/ground_segment/misc/Makefile b/sw/ground_segment/misc/Makefile index ae8bb2e300..d1f6eeae9b 100644 --- a/sw/ground_segment/misc/Makefile +++ b/sw/ground_segment/misc/Makefile @@ -2,7 +2,7 @@ UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") LIBRARYS = $(shell if test -d /opt/local/lib; then echo "-L/opt/local/lib"; elif test -d /opt/paparazzi/lib; then echo "-L/opt/paparazzi/lib"; fi) - INCLUDES = $(shell if test -d /opt/local/include; then echo "-I /opt/local/include"; elif test -d /opt/paparazzi/include; then echo "-I /opt/paparazzi/include"; fi) + INCLUDES = $(shell if test -d /opt/local/include; then echo "-I/opt/local/include"; elif test -d /opt/paparazzi/include; then echo "-I/opt/paparazzi/include"; fi) else LIBRARYS = -s endif diff --git a/sw/ground_segment/modem/Makefile b/sw/ground_segment/modem/Makefile index 75922eeb53..083b10a6f1 100644 --- a/sw/ground_segment/modem/Makefile +++ b/sw/ground_segment/modem/Makefile @@ -27,7 +27,7 @@ LOW_FUSE = 3f HIGH_FUSE = cb EXT_FUSE= ff LOCK_FUSE= ff -INCLUDES= -I ../../include +INCLUDES= -I../../include $(TARGET).srcs = \ main.c \ diff --git a/sw/ground_segment/multimon/Makefile b/sw/ground_segment/multimon/Makefile index d7c9d2988b..7d33e3cd25 100644 --- a/sw/ground_segment/multimon/Makefile +++ b/sw/ground_segment/multimon/Makefile @@ -3,8 +3,21 @@ Q=@ DEBUG =n MACHINE := $(shell uname -m) +AS86 =as86 -0 -a +LD86 =ld86 -0 +AS =as +LD =ld +LDFLAGS =-lm +HOSTCC =gcc +CC =gcc +MAKE =make +CPP =$(CC) -E +AR =ar +STRIP =strip +MKDIR =mkdir +OCAMLC =ocamlc -CFLAGS =-Wall -Wstrict-prototypes -I/usr/X11R6/include -I `ocamlc -where` +CFLAGS =-Wall -Wstrict-prototypes -I/usr/X11R6/include -I`$(OCAMLC) -where` ifeq ($(DEBUG),y) CFLAGS +=-g -O else @@ -20,25 +33,9 @@ endif LDFLAGSX =-lX11 -L/usr/X11R6/lib - #BINDIR =bin-$(shell uname -m) BINDIR =. -AS86 =as86 -0 -a -LD86 =ld86 -0 - -AS =as -LD =ld -LDFLAGS =-lm -HOSTCC =gcc -CC =gcc -MAKE =make -CPP =$(CC) -E -AR =ar -STRIP =strip -MKDIR =mkdir -OCAMLC =ocamlc - UNAME = $(shell uname -s) ifeq ("$(UNAME)","Linux") OBJFILES=pprzlib.o hdlc.o demod_afsk12.o demodml.o costabi.o gen_hdlc.o ml_hdlc.o demod.cmo hdlc.cmo @@ -100,7 +97,7 @@ costabi.c costabf.c: $(BINDIR)/mkcostab libtest: pprzlib.o demodml.c demod.ml test.ml - ocamlc -custom -o $@ pprzlib.o demodml.c -I +lablgtk2 unix.cma lablgtk.cma demod.ml test.ml + $(OCAMLC) -custom -o $@ pprzlib.o demodml.c -I +lablgtk2 unix.cma lablgtk.cma demod.ml test.ml hdlc_test : multimon.cma test_gen_hdlc.ml $(OCAMLC) -o $@ -custom -I +lablgtk2 -thread unix.cma threads.cma lablgtk.cma gtkThread.cmo -I . $^ -cclib -ljack @@ -121,7 +118,7 @@ clean: $(RM) $(BINDIR)/multimon depend dep: - $(CPP) -M $(CFLAGS) $(SRC_MISC) $(SRC_L1) $(SRC_L2) $(SRC_GEN) mkcostab.c > $(BINDIR)/.depend + $(CPP) -M $(CFLAGS) $(SRC_MISC) $(SRC_L1) $(SRC_L2) $(SRC_GEN) mkcostab.c > $(BINDIR)/.depend ifeq ($(BINDIR)/.depend,$(wildcard $(BINDIR)/.depend)) include $(BINDIR)/.depend diff --git a/sw/in_progress/button/Makefile b/sw/in_progress/button/Makefile index f2f0bcb54e..c24a18928a 100644 --- a/sw/in_progress/button/Makefile +++ b/sw/in_progress/button/Makefile @@ -25,7 +25,7 @@ Q=@ OCAMLC = ocamlc OCAMLOPT = ocamlopt -INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I ../../lib/ocaml +INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I ../../lib/ocaml all: panic @@ -57,8 +57,6 @@ gtk_export.ml : export.glade grep -v invisible_char $< > /tmp/$< lablgladecc2 -root export -hide-default /tmp/$< | grep -B 1000000 " end" > $@ - - pt : ahrsview imuview ahrs2fg CC = gcc diff --git a/sw/in_progress/motor_bench/Makefile b/sw/in_progress/motor_bench/Makefile index 4e8f6bbd82..b08228faec 100644 --- a/sw/in_progress/motor_bench/Makefile +++ b/sw/in_progress/motor_bench/Makefile @@ -1,8 +1,7 @@ CC = gcc -CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags` -I ../../../var/MB +CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags` -I../../../var/MB LDFLAGS=`pkg-config gtk+-2.0 --libs` -s -lglibivy - motor_bench : main.c $(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS) @@ -13,6 +12,6 @@ LOG=mb_log.txt plot_test: scilab -f test.sce -args $(LOG) - clean: rm -f *~ motor_bench + diff --git a/sw/lib/ocaml/Makefile b/sw/lib/ocaml/Makefile index 8a1eb2bbdf..8dfc147868 100644 --- a/sw/lib/ocaml/Makefile +++ b/sw/lib/ocaml/Makefile @@ -36,7 +36,7 @@ OCAMLC=ocamlc OCAMLOPT=ocamlopt OCAMLLEX=ocamllex OCAMLYACC=ocamlyacc -OCAMLLIBDIR=$(shell ocamlc -where) +OCAMLLIBDIR=$(shell $(OCAMLC) -where) SRC = fig.ml debug.ml base64.ml serial.ml ocaml_tools.ml expr_syntax.ml expr_parser.ml expr_lexer.ml extXml.ml env.ml xml2h.ml latlong.ml egm96.ml srtm.ml http.ml maps_support.ml gm.ml iGN.ml geometry_2d.ml cserial.o convert.o ubx.ml pprz.ml xbee.ml logpprz.ml xmlCom.ml os_calls.ml editAirframe.ml defivybus.ml @@ -80,7 +80,7 @@ tests : lib-pprz.cma $(TESTS_CMO) $(OCAMLC) $(INCLUDES) -custom -I . -o $@ str.cma unix.cma ivy-ocaml.cma xml-light.cma $^ GTKCFLAGS := `pkg-config --cflags gtk+-2.0` -#GTKCFLAGS := -I /usr/lib/gtk-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I /usr/include/cairo +#GTKCFLAGS := -I/usr/lib/gtk-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo # GTKCFLAGS := $(shell gtk-config --cflags) %.o : %.c diff --git a/sw/logalizer/Makefile b/sw/logalizer/Makefile index 71d397db08..3ef14468a3 100644 --- a/sw/logalizer/Makefile +++ b/sw/logalizer/Makefile @@ -106,7 +106,7 @@ disp3d: disp3d.c $(CC) $(MORE_CFLAGS) -g -o $@ $^ $(MORE_FLAGS) plotprofile: plotprofile.c - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy + $(CC) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy test1: test1.c $(CC) $(MORE_CFLAGS) -g -o $@ $^ $(MORE_FLAGS) -lglut @@ -153,16 +153,16 @@ test_samere: test_samere.c network.c flight_gear.c utils.c $(CC) $(CFLAGS) -I../airborne -I../airborne/test -I../include -g -o $@ $^ $(LDFLAGS) ivy_example: ivy_example.c - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy + $(CC) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy tmclient: tmclient.c - gcc -g -O1 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy + $(CC) -g -O1 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy ffjoystick: ffjoystick.c - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy -lm + $(CC) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy -lm ctrlstick: ctrlstick.c - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy + $(CC) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy # # Dependencies diff --git a/sw/simulator/old_booz/tests/Makefile b/sw/simulator/old_booz/tests/Makefile index 55f4f5b531..4784790c47 100644 --- a/sw/simulator/old_booz/tests/Makefile +++ b/sw/simulator/old_booz/tests/Makefile @@ -4,9 +4,9 @@ #JSBSIM = /usr/local #CC = g++ -#CFLAGS = -Wall -I $(JSBSIM)/include/JSBSim -I../include +#CFLAGS = -Wall -I$(JSBSIM)/include/JSBSim -I../include #LDFLAGS = -L$(JSBSIM)/lib -lJSBSim -#CFLAGS += -I /usr/include/meschach -I /usr/local/include/ +#CFLAGS += -I/usr/include/meschach -I/usr/local/include/ #LDFLAGS += -lmeschach -L/usr/lib #CFLAGS += `pkg-config glib-2.0 --cflags` #LDFLAGS += `pkg-config glib-2.0 --libs` -lm -lglibivy -lpcre @@ -24,11 +24,11 @@ JSBSIM = /home/violato/enac/programs/install_jsbsim CFLAGS = -Wall \ - -I .. \ - -I ../../../var/BOOZ2_A1 \ - -I ../../airborne \ - -I ../../include \ - -I $(JSBSIM)/include/JSBSim \ + -I.. \ + -I../../../var/BOOZ2_A1 \ + -I../../airborne \ + -I../../include \ + -I$(JSBSIM)/include/JSBSim \ `pkg-config glib-2.0 --cflags` \ LDFLAGS = -lm \