Skip to content

Commit

Permalink
Fix zip logic and clean up RPi additionsi
Browse files Browse the repository at this point in the history
  • Loading branch information
HunterZ committed Oct 6, 2015
1 parent 8f9130d commit 294cfc5
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ UPX := upx -9
# packaging macros
PFILES := LICENSE README.md
PVERSION := $(shell grep VERSION util.h | awk '{print $$NF}' | sed 's|\"||g')
PCMD := zip
PCMD := zip -j

# x86 environment
CC32 := $(CC) -m32
Expand Down Expand Up @@ -64,9 +64,9 @@ RPISTRIP := $(RPIPREFIX)$(STRIP)
# - mips version could be K24 or K26 depending on environment
# - tomatoware is not included in the 'all' target, because it's for compiling natively on a router

.PHONY: all clean distclean printver x86 x86_x64 mips arm tomatoware RPi
.PHONY: all clean distclean printver x86 x86_x64 mips arm tomatoware rpi

all: x86 x86_64 mips arm RPi
all: x86 x86_64 mips #arm rpi
@echo "=== Built all x86 and cross-compiler targets ==="

clean:
Expand All @@ -93,7 +93,7 @@ x86: printver dist
$(STRIP) dist/$(DISTNAME)[email protected].*
$(UPX) dist/$(DISTNAME)[email protected].*
rm -f dist/$(DISTNAME).$(PVERSION)[email protected]
$(PCMD) dist/$(DISTNAME).$(PVERSION)[email protected] $(PFILES)
$(PCMD) dist/$(DISTNAME).$(PVERSION)[email protected] $(PFILES) dist/$(DISTNAME).$@.*

x86_64: printver dist
@echo "=== Building x86-64 ==="
Expand All @@ -104,7 +104,7 @@ x86_64: printver dist
$(STRIP) dist/$(DISTNAME)[email protected].*
$(UPX) dist/$(DISTNAME)[email protected].*
rm -f dist/$(DISTNAME).$(PVERSION)[email protected]
$(PCMD) dist/$(DISTNAME).$(PVERSION)[email protected] $(PFILES)
$(PCMD) dist/$(DISTNAME).$(PVERSION)[email protected] $(PFILES) dist/$(DISTNAME).$@.*

mips: printver dist
@echo "=== Building MIPS ==="
Expand All @@ -115,7 +115,7 @@ mips: printver dist
$(MIPSPATH) $(MIPSSTRIP) dist/$(DISTNAME).$@.performance.*
$(UPX) dist/$(DISTNAME).$@.performance.*
rm -f dist/$(DISTNAME).$(PVERSION).$@.zip
$(PCMD) dist/$(DISTNAME).$(PVERSION).$@.zip $(PFILES)
$(PCMD) dist/$(DISTNAME).$(PVERSION).$@.zip $(PFILES) dist/$(DISTNAME).$@.*

arm: printver dist
@echo "=== Building ARM ==="
Expand All @@ -126,7 +126,7 @@ arm: printver dist
$(ARMPATH) $(ARMSTRIP) dist/$(DISTNAME).$@.performance.*
$(UPX) dist/$(DISTNAME).$@.performance.*
rm -f dist/$(DISTNAME).$(PVERSION).$@.zip
$(PCMD) dist/$(DISTNAME).$(PVERSION).$@.zip $(PFILES)
$(PCMD) dist/$(DISTNAME).$(PVERSION).$@.zip $(PFILES) dist/$(DISTNAME).$@.*

tomatoware: printver dist
@echo "=== Building tomatoware ==="
Expand All @@ -137,9 +137,9 @@ tomatoware: printver dist
$(STRIP) dist/$(DISTNAME).$@.performance.*
$(UPX) dist/$(DISTNAME).$@.performance.*
rm -f dist/$(DISTNAME).$(PVERSION).$@.zip
$(PCMD) dist/$(DISTNAME).$(PVERSION).$@.zip $(PFILES)
$(PCMD) dist/$(DISTNAME).$(PVERSION).$@.zip $(PFILES) dist/$(DISTNAME).$@.*

RPi: printver dist
rpi: printver dist
@echo "=== Building for Raspberry Pi ==="
$(RPIPATH) $(RPICC) $(CFLAGS_D) $(LDFLAGS_D) $(OPTS) $(RPIOPTS) $(SRCS) -o dist/$(DISTNAME).$@.debug.dynamic
$(RPIPATH) $(RPICC) $(CFLAGS_P) $(LDFLAGS_P) $(OPTS) $(RPIOPTS) $(SRCS) -o dist/$(DISTNAME).$@.performance.dynamic
Expand All @@ -148,5 +148,4 @@ RPi: printver dist
$(RPIPATH) $(RPISTRIP) dist/$(DISTNAME)[email protected].*
$(UPX) dist/$(DISTNAME)[email protected].*
rm -f dist/$(DISTNAME).$(PVERSION)[email protected]
$(PCMD) dist/$(DISTNAME).$(PVERSION)[email protected] $(PFILES)

$(PCMD) dist/$(DISTNAME).$(PVERSION)[email protected] $(PFILES) dist/$(DISTNAME).$@.*

0 comments on commit 294cfc5

Please sign in to comment.