-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move to a makefile in prep for binary releases
- Loading branch information
Jeffrey Clark
committed
Mar 12, 2014
1 parent
1e435a0
commit a49106c
Showing
3 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ | |
*.exe | ||
*.out | ||
*.app | ||
|
||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
OPTS := -DDO_COUNT -DTEXT_REPLY -DREAD_FILE -DREAD_GIF -DNULLSERV_REPLIES -DSSL_RESP | ||
TEST_OPTS := -DTEST -DVERBOSE | ||
TINY_OPTS := -O3 -DTINY | ||
DEBUG_OPT := -DHEX_DUMP | ||
CC := gcc | ||
CFLAGS += -Os -s -Wall -ffunction-sections -fdata-sections -fno-strict-aliasing | ||
LDFLAGS += -Wl,--gc-sections | ||
STRIP := strip -s -R .note -R .comment -R .gnu.version -R .gnu.version_r | ||
CROSSCC := mipsel-uclibc-gcc | ||
CROSSSTRIP:= mipsel-uclibc-$(STRIP) | ||
SRC = pixelserv.c | ||
|
||
# mips uclib toolchain | ||
export PATH := /opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin:$(PATH) | ||
|
||
all: dist mips tiny host32 host64 | ||
@echo "Builds in dist folder." | ||
|
||
dist: | ||
@mkdir dist | ||
|
||
mips: | ||
$(CROSSCC) -mips32 $(CFLAGS) $(LDFLAGS) $(OPTS) $(SRC) -o dist/pixelserv.mips32 | ||
$(CROSSSTRIP) dist/pixelserv.mips32 | ||
|
||
host32: | ||
$(CC) -m32 $(CFLAGS) $(LDFLAGS) $(OPTS) $(SRC) -o dist/pixelserv.x86 | ||
$(STRIP) dist/pixelserv.x86 | ||
|
||
host64: | ||
$(CC) -m64 $(CFLAGS) $(LDFLAGS) $(OPTS) $(SRC) -o dist/pixelserv.amd64 | ||
$(STRIP) dist/pixelserv.amd64 | ||
|
||
tiny: | ||
$(CROSSCC) -mips32 $(CFLAGS) $(LDFLAGS) $(TINY_OPTS) $(SRC) -o dist/pixelserv.tiny.mips32 | ||
$(CROSSSTRIP) dist/pixelserv.tiny.mips32 |