mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 04:46:51 +08:00
This commit is contained in:
@@ -0,0 +1,98 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
# Copyright (C) 2009 Antoine Drouin
|
||||||
|
#
|
||||||
|
# This file is part of paparazzi.
|
||||||
|
#
|
||||||
|
# paparazzi is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# paparazzi is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with paparazzi; see the file COPYING. If not, write to
|
||||||
|
# the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
|
# Boston, MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Define programs and commands.
|
||||||
|
|
||||||
|
OVERO_OE=/overo-oe
|
||||||
|
|
||||||
|
CC = $(OVERO_OE)/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-gcc
|
||||||
|
LD = $(CC)
|
||||||
|
|
||||||
|
# Launch with "make Q=''" to get full command display
|
||||||
|
Q=@
|
||||||
|
|
||||||
|
OPT=3
|
||||||
|
CSTANDARD = -std=gnu99
|
||||||
|
CINCS = -I$(PAPARAZZI_SRC)/sw/include
|
||||||
|
|
||||||
|
# Compiler flags.
|
||||||
|
CFLAGS += $(CINCS)
|
||||||
|
CFLAGS += -O$(OPT)
|
||||||
|
# CFLAGS += -malignment-traps
|
||||||
|
#CFLAGS += -Wall -Wcast-qual -Wimplicit -Wcast-align
|
||||||
|
#CFLAGS += -Wpointer-arith -Wswitch
|
||||||
|
#CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
|
||||||
|
#CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<))
|
||||||
|
#CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
||||||
|
#CFLAGS += -mtune=geode # optimize for geode
|
||||||
|
|
||||||
|
# flags only for C
|
||||||
|
#CFLAGS + = -Wstrict-prototypes -Wmissing-declarations
|
||||||
|
#CFLAGS += -Wmissing-prototypes -Wnested-externs
|
||||||
|
CFLAGS += $(CSTANDARD)
|
||||||
|
CFLAGS += $($(TARGET).CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
SRCOMAP = $($(TARGET).srcs)
|
||||||
|
COBJOMAP = $(SRCOMAP:%.c=$(OBJDIR)/%.o)
|
||||||
|
|
||||||
|
all: build
|
||||||
|
|
||||||
|
build: elf
|
||||||
|
|
||||||
|
elf: $(OBJDIR)/$(TARGET).elf
|
||||||
|
|
||||||
|
# Program the device.
|
||||||
|
load upload program: $(OBJDIR)/$(TARGET).elf
|
||||||
|
scp $(OBJDIR)/$(TARGET).elf $(USER)@$(HOST):$(TARGET_DIR)
|
||||||
|
|
||||||
|
# Link: create ELF output file from object files.
|
||||||
|
.SECONDARY : $(OBJDIR)/$(TARGET).elf
|
||||||
|
.PRECIOUS : $(COBJOMAP)
|
||||||
|
%.elf: $(COBJOMAP)
|
||||||
|
@echo LD $@
|
||||||
|
$(Q)$(CC) $(CFLAGS) $(COBJOMAP) --output $@ $(LDFLAGS) $($(TARGET).LDFLAGS)
|
||||||
|
|
||||||
|
# Compile: create object files from C source files. ARM-only
|
||||||
|
$(OBJDIR)/%.o : %.c $(OBJDIR)/../Makefile.ac
|
||||||
|
@echo CC $@
|
||||||
|
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
||||||
|
$(Q)$(CC) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
# Listing of phony targets.
|
||||||
|
.PHONY : all build elf clean clean_list
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dependencies
|
||||||
|
#
|
||||||
|
|
||||||
|
$(OBJDIR)/.depend:
|
||||||
|
@echo DEPEND $@
|
||||||
|
@test -d $(OBJDIR) || mkdir -p $(OBJDIR)
|
||||||
|
$(Q)$(CC) -MM -MG $(CFLAGS) $($(TARGET).CFLAGS) $($(TARGET).srcs) | sed 's|\([^\.]*\.o\)|$(OBJDIR)/\1|' > $@
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
ifneq ($(MAKECMDGOALS),erase)
|
||||||
|
-include $(OBJDIR)/.depend
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
ARCHI=geode
|
|
||||||
|
|
||||||
SRC_FMS=fms
|
|
||||||
|
|
||||||
ap.ARCHDIR = $(ARCHI)
|
|
||||||
|
|
||||||
ap.LDFLAGS = -lm -levent -lrt
|
|
||||||
|
|
||||||
ap.CFLAGS += -I$(SRC_FMS)
|
|
||||||
|
|
||||||
ap.srcs=$(SRC_FMS)/fms_test_datalink.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DDOWNLINK
|
|
||||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=UdpTransport
|
|
||||||
ap.srcs += $(SRC_FMS)/fms_network.c
|
|
||||||
ap.srcs += $(SRC_FMS)/udp_transport.c
|
|
||||||
ap.srcs += downlink.c
|
|
||||||
@@ -32,7 +32,9 @@ TT_SRCS += fms_network.c udp_transport.c ../downlink.c
|
|||||||
#<s4wrxttcs2> I just use "export PATH=${PATH}:/home/gumstix/oe/tmp/cross/armv7a/bin" and
|
#<s4wrxttcs2> I just use "export PATH=${PATH}:/home/gumstix/oe/tmp/cross/armv7a/bin" and
|
||||||
#<s4wrxttcs2> or "make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi-" if I have a makefile
|
#<s4wrxttcs2> or "make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi-" if I have a makefile
|
||||||
|
|
||||||
CROSS_CC=/home/poine/overo-oe/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-gcc
|
OVERO_OE=/overo-oe
|
||||||
|
|
||||||
|
CROSS_CC=$(OVERO_OE)/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-gcc
|
||||||
|
|
||||||
CROSS_CFLAGS = -Wall
|
CROSS_CFLAGS = -Wall
|
||||||
CROSS_LDFLAGS =
|
CROSS_LDFLAGS =
|
||||||
|
|||||||
Reference in New Issue
Block a user