Add nmf generation to Makefile

Also, fix file suffix for nacl builds.
This commit is contained in:
Sam Clegg 2012-11-15 16:59:39 -08:00
parent a03190055d
commit 77a1eb00bb
4 changed files with 21 additions and 13 deletions

View file

@ -549,7 +549,7 @@ endif
# Examples
ifneq ($(filter nacl%,$(SYSTEM)),)
regal.bin: lib bin bin/nacl$(BIN_EXTENSION)
regal.bin: lib bin bin/nacl$(BIN_EXTENSION) examples/nacl/nacl.nmf
else
regal.bin: lib bin bin/glewinfo bin/dreamtorus bin/tiger
endif
@ -590,7 +590,7 @@ NACLHELLOWORLD.OBJS := $(addprefix tmp/$(SYSTEM)/nacl/static/,$(NACLHELLOW
NACLHELLOWORLD.OBJS := $(NACLHELLOWORLD.OBJS:.cpp=.o)
NACLHELLOWORLD.CFLAGS := -Iinclude
NACLHELLOWORLD.LIBS += -L./lib -Wl,-Bstatic -lRegal -Wl,-Bdynamic
NACLHELLOWORLD.LIBS += -lm -lpthread -lppapi -lppapi_gles2 -lstdc++
NACLHELLOWORLD.LIBS += -lpng -lz -lm -lpthread -lppapi -lppapi_gles2 -lstdc++
tmp/$(SYSTEM)/nacl/static/%.o: examples/nacl/%.cpp
@mkdir -p $(dir $@)
@ -602,6 +602,12 @@ ifneq ($(STRIP),)
$(STRIP) -x $@
endif
TOOLCHAIN=$(NACL_SDK_ROOT)/toolchain/linux_x86_glibc
# Uncomment this to enable automatic regeneration of the nacl nmf file
#examples/nacl/nacl.nmf: bin/nacl$(BIN_EXTENSION)
#$(NACL_SDK_ROOT)/tools/create_nmf.py -o $@ -D $(TOOLCHAIN)/x86_64-nacl/bin/objdump -t glibc bin/nacl* -L $(TOOLCHAIN)/x86_64-nacl/lib32 -L $(TOOLCHAIN)/x86_64-nacl/lib -s examples/nacl
# GLUT and GLU dependency for non-Mac, non-Nacl builds
ifeq ($(filter darwin%,$(SYSTEM)),)

View file

@ -14,6 +14,7 @@ LD := $(M_PREFIX)-nacl-g++ -m32
STRIP ?=
endif
BIN_EXTENSION = _32.nexe
EXT.DYNAMIC = so
LDFLAGS.EXTRA =
LIBDIR =

View file

@ -14,6 +14,7 @@ LD := $(M_PREFIX)-nacl-g++ -m64
STRIP ?=
endif
BIN_EXTENSION = _64.nexe
EXT.DYNAMIC = so
LDFLAGS.EXTRA =
LIBDIR =

View file

@ -1,8 +1,8 @@
{
"files": {
"libpthread.so.a9de5678": {
"main.nexe": {
"x86-64": {
"url": "lib64/libpthread.so.a9de5678"
"url": "nacl_64.nexe"
}
},
"libstdc++.so.6": {
@ -10,29 +10,29 @@
"url": "lib64/libstdc++.so.6"
}
},
"libm.so.51fe1ff9": {
"x86-64": {
"url": "lib64/libm.so.51fe1ff9"
}
},
"libppapi_gles2.so": {
"x86-64": {
"url": "lib64/libppapi_gles2.so"
}
},
"libc.so.a9de5678": {
"x86-64": {
"url": "lib64/libc.so.a9de5678"
}
},
"libgcc_s.so.1": {
"x86-64": {
"url": "lib64/libgcc_s.so.1"
}
},
"main.nexe": {
"libpthread.so.51fe1ff9": {
"x86-64": {
"url": "nacl.x64.nexe"
"url": "lib64/libpthread.so.51fe1ff9"
}
},
"libm.so.a9de5678": {
"libc.so.51fe1ff9": {
"x86-64": {
"url": "lib64/libm.so.a9de5678"
"url": "lib64/libc.so.51fe1ff9"
}
}
},