Skip to content

Commit

Permalink
Rename 'snabbswitch' command to 'snabb'.
Browse files Browse the repository at this point in the history
Short and sweet!

Adds a 'make install' target to install as /usr/local/bin/snabb.

snabbswitch/src/snabbswitch is created as a symlink for compatibility.
  • Loading branch information
lukego committed Apr 27, 2014
1 parent e33a9e0 commit 0e4e7a6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,31 @@ TESTMODS = $(shell find . -regex '[^\#]*\.lua' -printf '%P ' | \

PATH := ../deps/luajit/usr/local/bin:$(PATH)

all: snabbswitch
all: snabb

install: snabb
cp snabb /usr/local/bin/

markdown: $(RMOBJS)

snabbswitch: $(LUAOBJ) $(HOBJ) $(COBJ) $(ASMOBJ)
snabb: $(LUAOBJ) $(HOBJ) $(COBJ) $(ASMOBJ)
$(E) "LINK $@"
$(Q) gcc -Wl,-E -Werror -Wall -o $@ $^ \
../deps/luajit/src/libluajit.a \
-lc -ldl -lm -lrt -lpthread
@echo -n "Firmware: "
@ls -sh snabbswitch
@ln -fs snabb snabbswitch
@ls -sh snabb

test: $(TESTMODS)

test_ci: FAIL_ON_FIRST="true"

test_ci: $(TESTMODS)

$(TESTMODS): testlog snabbswitch
$(TESTMODS): testlog snabb
$(E) "TEST $@"
$(Q) ./snabbswitch -t $@ > testlog/$@ || ( \
$(Q) ./snabb -t $@ > testlog/$@ || ( \
EXITCODE="$$?"; \
[ "$$EXITCODE" -eq $(TEST_SKIPPED) ] \
&& ( \
Expand Down Expand Up @@ -136,7 +140,7 @@ doc/snabbswitch.html doc/snabbswitch.epub: doc/snabbswitch.md
$(E) "PANDOC $@"
$(Q) pandoc -S --toc --chapters -o $@ $<

CLEAN = snabbswitch obj doc/snabbswitch.* doc/obj/*.md testlog
CLEAN = snabb snabbswitch obj doc/snabbswitch.* doc/obj/*.md testlog

clean:
$(E) "RM $(CLEAN)"
Expand Down

0 comments on commit 0e4e7a6

Please sign in to comment.