[ARDrone] Fix static compilation, synchro Makefiles

This commit is contained in:
Matteo Cypriani 2011-08-18 09:57:03 +02:00
parent dc3ba41222
commit 2c91f5b976
2 changed files with 17 additions and 14 deletions

View File

@ -1,6 +1,6 @@
# Source version # Source version
ifndef OWLPS_VERSION ifndef OWLPS_VERSION
OWLPS_VERSION = $$(git describe || echo 'UNKNOWN_VERSION') OWLPS_VERSION = $(shell git describe || echo 'UNKNOWN_VERSION')
endif endif
# Répertoire d'installation # Répertoire d'installation
@ -17,8 +17,8 @@ ifeq ($(COLORGCC), 0)
endif endif
# Commandes d'installation et de désinstallation # Commandes d'installation et de désinstallation
RM=rm -fv RM = rm -f
CP=cp -v CP = cp
# Cible # Cible
TARGET=owlps-drone TARGET=owlps-drone
@ -34,8 +34,8 @@ XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
PICFLAG = -fPIC PICFLAG = -fPIC
LIBS = -L$(LIBOWLPS_DIR) -lowlps \ LIBS = -L$(LIBOWLPS_DIR) -lowlps \
-L$(LIBOWLPSCLIENT_DIR) -lowlps-client \ -L$(LIBOWLPSCLIENT_DIR) -lowlps-client \
-lrt -lm -lrt -lm -pthread
STATIC_LIBS = -liw -lm -lrt STATIC_LIBS =
OWLPSFLAGS = -D OWLPS_VERSION=\"$(OWLPS_VERSION)\" OWLPSFLAGS = -D OWLPS_VERSION=\"$(OWLPS_VERSION)\"
## Cibles de compilation standard ## ## Cibles de compilation standard ##

View File

@ -1,6 +1,6 @@
# Source version # Source version
ifndef OWLPS_VERSION ifndef OWLPS_VERSION
OWLPS_VERSION = $$(git describe || echo 'UNKNOWN_VERSION') OWLPS_VERSION = $(shell git describe || echo 'UNKNOWN_VERSION')
endif endif
# Emplacement de la suite de cross-compilation # Emplacement de la suite de cross-compilation
@ -20,8 +20,8 @@ INSTALL_INC= $(PREFIX)/include
INSTALL_MAN= $(PREFIX)/share/man INSTALL_MAN= $(PREFIX)/share/man
# Commandes d'installation et de désinstallation # Commandes d'installation et de désinstallation
RM=rm -f RM = rm -f
CP=cp -v CP = cp
# Cible # Cible
TARGET=owlps-drone TARGET=owlps-drone
@ -30,14 +30,15 @@ DEPS = oc.o
# Flags # Flags
LIBOWLPS_DIR = ../libowlps LIBOWLPS_DIR = ../libowlps
LIBOWLPSCLIENT_DIR = ../libowlps-client LIBOWLPSCLIENT_DIR = ../libowlps-client
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -I. CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes \
-I$(LIBOWLPS_DIR) -I$(LIBOWLPSCLIENT_DIR)
DEPFLAGS = -MMD DEPFLAGS = -MMD
XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
PICFLAG = -fPIC PICFLAG = -fPIC
LOWLPS = -L$(LIBOWLPS_DIR) -lowlps LOWLPS = -L$(LIBOWLPS_DIR) -lowlps
LOWLPSA = $(LIBOWLPS_DIR)/libowlps.a LOWLPSA = $(LIBOWLPS_DIR)/libowlps.a
LOWLPSCLIENTA = $(LIBOWLPSCLIENT_DIR)/libowlps-client.a LOWLPSCLIENTA = $(LIBOWLPSCLIENT_DIR)/libowlps-client.a
LIBS = $(LOWLPSCLIENTA) -liw -lm -lrt LIBS = $(LOWLPSCLIENTA) -lrt -lm -pthread
DYNAMIC_LIBS = $(LOWLPS) $(LIBS) DYNAMIC_LIBS = $(LOWLPS) $(LIBS)
SEMISTATIC_LIBS = $(LOWLPSA) $(LIBS) SEMISTATIC_LIBS = $(LOWLPSA) $(LIBS)
STATIC_LIBS = $(LOWLPSA) $(LIBS) STATIC_LIBS = $(LOWLPSA) $(LIBS)
@ -75,8 +76,12 @@ install : $(TARGET)
@$(CP) $(TARGET) $(INSTALL_DIR) @$(CP) $(TARGET) $(INSTALL_DIR)
@cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET) @cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET)
install-static : $(TARGET).static
@$(CP) $(TARGET).static $(INSTALL_DIR)
@cd $(INSTALL_DIR) ; chown root:root $(TARGET).static ; chmod 755 $(TARGET).static
uninstall : uninstall :
@$(RM) $(INSTALL_DIR)/$(TARGET) @$(RM) $(INSTALL_DIR)/{$(TARGET),$(TARGET).static}
## Nettoyage ## ## Nettoyage ##
@ -85,7 +90,7 @@ clean :
@$(RM) -fv *~ *.o *.d @$(RM) -fv *~ *.o *.d
purge : clean purge : clean
@$(RM) -fv $(TARGET) $(TARGET).static $(TARGET)-drone @$(RM) -fv $(TARGET) $(TARGET).static
## Aide ## ## Aide ##
@ -98,8 +103,6 @@ help :
$(TARGET) (cible par défaut) : Compile le programme $(TARGET).\n\ $(TARGET) (cible par défaut) : Compile le programme $(TARGET).\n\
$(TARGET).static : Compile le programme $(TARGET).static \ $(TARGET).static : Compile le programme $(TARGET).static \
(version sans lien dynamique).\n\ (version sans lien dynamique).\n\
$(TARGET).semistatic : Compile le programme $(TARGET).semistatic \
(version sans lien dynamique vers libowlps).\n\
install : Installe le programme $(TARGET).\n\ install : Installe le programme $(TARGET).\n\
uninstall : Désinstalle le programme $(TARGET).\n\ uninstall : Désinstalle le programme $(TARGET).\n\
clean : Supprime les fichiers temporaires.\n\ clean : Supprime les fichiers temporaires.\n\