Skip to content

Commit

Permalink
Added flight make target
Browse files Browse the repository at this point in the history
Still isn't great but I'm in the middle of the desert and don't
have The GNU Make Manual handy
  • Loading branch information
ThirteenFish committed Jul 20, 2014
1 parent 98d67ca commit 73687fe
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion common/psas.mk
Expand Up @@ -8,17 +8,25 @@ PSAS_NETSRC = $(PSAS_NET)/rci.c $(PSAS_NET)/net_addrs.c $(PSAS_NET)/utils
PSAS_BOARDS = $(PSAS_COMMON)/boards
PSAS_RULES = $(PSAS_OPENOCD)/openocd.mk

flight: MAKECMDGOALS = flight
flight: all

ifeq ($(shell git diff-index --quiet HEAD . ../../common; echo $$?), 1)
INDEX_DIRTY = M
else
INDEX_DIRTY =
endif

ifeq ($(MAKECMDGOALS),)
ifeq ($(MAKECMDGOALS), )
VERSION_PREFIX = dev-
else
VERSION_PREFIX = $(MAKECMDGOALS)-
endif

ifeq ($(MAKECMDGOALS), flight)
BUILDFLAG = -DFLIGHT
endif


PSAS_VERSION = "\"$(VERSION_PREFIX)`git rev-parse --short HEAD`$(INDEX_DIRTY)\""

2 changes: 1 addition & 1 deletion projects/flight-gps/Makefile
Expand Up @@ -193,7 +193,7 @@ DLIBS =
#

# List all user C define here, like -D_DEBUG=1
UDEFS = -DGIT_COMMIT_VERSION=$(PSAS_VERSION)
UDEFS = $(BUILDFLAG) -DGIT_COMMIT_VERSION=$(PSAS_VERSION)


# Define ASM defines here
Expand Down
2 changes: 1 addition & 1 deletion projects/flight-imu/Makefile
Expand Up @@ -211,7 +211,7 @@ DLIBS =
#

# List all user C define here, like -D_DEBUG=1
UDEFS = -DGIT_COMMIT_VERSION=$(PSAS_VERSION)
UDEFS = $(BUILDFLAG) -DGIT_COMMIT_VERSION=$(PSAS_VERSION)



Expand Down
2 changes: 1 addition & 1 deletion projects/flight-rnh/Makefile
Expand Up @@ -208,7 +208,7 @@ DLIBS =

# List all user C define here, like -D_DEBUG=1
#UDEFS = -DADIS_DEBUG=1
UDEFS = -DGIT_COMMIT_VERSION=$(PSAS_VERSION)
UDEFS = $(BUILDFLAG) -DGIT_COMMIT_VERSION=$(PSAS_VERSION)

# Define ASM defines here
UADEFS =
Expand Down
2 changes: 1 addition & 1 deletion projects/flight-servo/Makefile
Expand Up @@ -194,7 +194,7 @@ DLIBS =
#

# List all user C define here, like -D_DEBUG=1
UDEFS = -DFLIGHT -DGIT_COMMIT_VERSION=$(PSAS_VERSION)
UDEFS = $(BUILDFLAG) -DGIT_COMMIT_VERSION=$(PSAS_VERSION)


# Define ASM defines here
Expand Down

0 comments on commit 73687fe

Please sign in to comment.