No uses espacios en la ruta de los nombres, ahí está tu solución.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: patilanz en 16 Enero 2015, 23:58 PM
Ahora veo lo de SFTP pero ahora mismo estaba probando con openssl y se me ocurrió porque no generar una clave, que ya tengo privada y publica, luego cifrar la contraseña con esa clave desde php con openssl_public_encrypt y luego en c++ desencriptarla con alguna librería de ssl teniendo la clave privada guardada en el exe ?
@Edit: He visto que sftp no esta disponible en hostinger así que no creo que sera una alternativa.
Cita de: patilanz en 16 Enero 2015, 22:27 PM
Si codifico la clave luego para pasar la por el ftp tengo que descifrar la y viaja sin codificar. Quiero implemente https pero no estoy seguro como. Tengo el ftp en un servidor de hostinger gratuito y he leído que con curl se puede con php, es lo que quiero. En plan conectarme al https en un archivo php que me va proporcionar la clave para enviarla al exe que se conectara al ftp. Así ?
Como se hace el https ?
@Edit: Con OpenSLL ?
gcc -MMD -MP -MF /home/almamu/Escritorio/smash_tmp/smash/nflib/build/video.d -g -Wall -O2 -fomit-frame-pointer -ffast-math -I/home/almamu/Escritorio/smash_tmp/smash/nflib/include -I/home/almamu/Escritorio/smash_tmp/smash/nflib/win/include -I/home/almamu/Escritorio/smash_tmp/smash/nflib/build -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D__UNIXBUILD -Wno-unused-result -c /home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c -o video.o
ar -rc /home/almamu/Escritorio/smash_tmp/smash/nflib/lib/libnflib.a nf_2d.o nf_3d.o nf_affinebg.o nf_basic.o nf_bitmapbg.o nf_colision.o nf_media.o nf_mixedbg.o nf_sound.o nf_sprite256.o nf_sprite3d.o nf_text16.o nf_text.o nf_tiledbg.o dswifi9.o nitrofs.o debugprint.o console.o keys.o video.o
g++ -MMD -MP -MF /home/almamu/Escritorio/smash_tmp/smash/render/build/graphics.d -g -Wall -O2 -fomit-frame-pointer -ffast-math -I/home/almamu/Escritorio/smash_tmp/smash/render/include -I/home/almamu/Escritorio/smash_tmp/smash/render/win/include -I/home/almamu/Escritorio/smash_tmp/smash/core/include -I/home/almamu/Escritorio/smash_tmp/smash/nflib/include -I/home/almamu/Escritorio/smash_tmp/smash/nflib/win/include -I/home/almamu/Escritorio/smash_tmp/smash/render/build -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D__UNIXBUILD -Wno-unused-result -fno-rtti -fno-exceptions -std=c++11 -c /home/almamu/Escritorio/smash_tmp/smash/render/win/source/graphics.cpp -o graphics.o
ar -rc /home/almamu/Escritorio/smash_tmp/smash/render/lib/librender.a graphics.o
g++ -MMD -MP -MF /home/almamu/Escritorio/smash_tmp/smash/core/build/strings.d -g -Wall -O2 -fomit-frame-pointer -ffast-math -Wformat=0 -I/home/almamu/Escritorio/smash_tmp/smash/core/include -I/home/almamu/Escritorio/smash_tmp/smash/nflib/include -I/home/almamu/Escritorio/smash_tmp/smash/render/include -I/home/almamu/Escritorio/smash_tmp/smash/render/include -I/home/almamu/Escritorio/smash_tmp/smash/render/win/include -I/home/almamu/Escritorio/smash_tmp/smash/nflib/include -I/home/almamu/Escritorio/smash_tmp/smash/nflib/win/include -I/home/almamu/Escritorio/smash_tmp/smash/core/build -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D__UNIXBUILD -fno-rtti -fno-exceptions -fpermissive -std=c++11 -c /home/almamu/Escritorio/smash_tmp/smash/core/source/strings.cpp -o strings.o
g++ -g -Wl,-Map,core.map -L/usr/lib/x86_64-linux-gnu -lSDL assets.o battle.o client.o cmap.o common.o events.o filesystem.o input.o main.o memory.o messages.o mvars.o network.o server.o strings.o -L/home/almamu/Escritorio/smash_tmp/smash/nflib/lib -L/home/almamu/Escritorio/smash_tmp/smash/render/lib -lrender -lnflib -o /home/almamu/Escritorio/smash_tmp/smash/core/core.elf
/home/almamu/Escritorio/smash_tmp/smash/render/lib/librender.a(graphics.o): En la función `R_PrecacheBackground(assetHeader_t*, unsigned char, unsigned char, bool)':
/home/almamu/Escritorio/smash_tmp/smash/render/win/source/graphics.cpp:492: referencia a `SDL_CreateRGBSurface' sin definir
/home/almamu/Escritorio/smash_tmp/smash/render/win/source/graphics.cpp:514: referencia a `SDL_CreateRGBSurfaceFrom' sin definir
/home/almamu/Escritorio/smash_tmp/smash/render/win/source/graphics.cpp:515: referencia a `SDL_UpperBlit' sin definir
/home/almamu/Escritorio/smash_tmp/smash/render/lib/librender.a(graphics.o): En la función `R_UpdateBackground(background_t*)':
/home/almamu/Escritorio/smash_tmp/smash/render/win/source/graphics.cpp:568: referencia a `SDL_UpperBlit' sin definir
/home/almamu/Escritorio/smash_tmp/smash/render/lib/librender.a(graphics.o): En la función `R_SetBackgroundVisibility(unsigned char, unsigned char, bool)':
/home/almamu/Escritorio/smash_tmp/smash/render/win/source/graphics.cpp:599: referencia a `SDL_FillRect' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/lib/libnflib.a(nf_2d.o): En la función `NF_Set2D(unsigned char, unsigned char)':
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/nf_2d.cpp:31: referencia a `SDL_MapRGB' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/nf_2d.cpp:31: referencia a `SDL_FillRect' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/lib/libnflib.a(nf_tiledbg.o): En la función `NF_ResetTiledBgBuffers()':
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/nf_tiledbg.cpp:98: referencia a `SDL_FreeSurface' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/lib/libnflib.a(keys.o): En la función `scanKeys':
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/keys.c:22: referencia a `SDL_PollEvent' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/keys.c:153: referencia a `SDL_Quit' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/keys.c:22: referencia a `SDL_PollEvent' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/lib/libnflib.a(video.o): En la función `defaultExceptionHandler':
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:75: referencia a `SDL_Init' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:81: referencia a `SDL_SetVideoMode' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:87: referencia a `SDL_EnableUNICODE' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:88: referencia a `SDL_WM_SetCaption' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:94: referencia a `SDL_MapRGB' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:95: referencia a `SDL_SetColorKey' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:102: referencia a `SDL_CreateRGBSurface' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:103: referencia a `SDL_SetColorKey' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:108: referencia a `SDL_CreateRGBSurface' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:111: referencia a `SDL_FillRect' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:112: referencia a `SDL_SetColorKey' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/lib/libnflib.a(video.o): En la función `swiWaitForVBlank':
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:150: referencia a `SDL_UpperBlit' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:163: referencia a `SDL_UpperBlit' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:167: referencia a `SDL_Flip' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:175: referencia a `SDL_FillRect' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:184: referencia a `SDL_GetTicks' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:189: referencia a `SDL_Delay' sin definir
/home/almamu/Escritorio/smash_tmp/smash/nflib/win/source/libnds/nds/arm9/video.c:192: referencia a `SDL_GetTicks' sin definir
# --------------------------------------
# COMPILER DEFINITIONS
# --------------------------------------
export MKFILE_PATH = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
export BRANCH_NAME = $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
export DST_PLATFORM = UNIX
export PLATFORM_DEF = __$(DST_PLATFORM)BUILD
# --------------------------------------
# BINARIES CONFIGURATION
# --------------------------------------
export LIB_EXTENSION = a
export EXE_EXTENSION = out
export OUT_EXTENSION = elf
# --------------------------------------
# SDL config
# --------------------------------------
export SDL_CFLAGS = $(shell sdl-config --cflags)
export SDL_DFLAGS = $(shell sdl-config --libs)
# --------------------------------------
# NFLIB config
# --------------------------------------
export NFLIB_NAME = nflib
export NFLIB_DIR = $(MKFILE_PATH)$(NFLIB_NAME)
export NFLIB_LIB = $(NFLIB_DIR)/lib
export NFLIB_INC = include win/include
export NFLIB_EXTENSION = $(LIB_EXTENSION)
# --------------------------------------
# RENDER config
# --------------------------------------
export RENDER_NAME = render
export RENDER_DIR = $(MKFILE_PATH)$(RENDER_NAME)
export RENDER_INC = include win/include
export RENDER_LIB = $(RENDER_DIR)/lib
export RENDER_EXTENSION = $(LIB_EXTENSION)
# --------------------------------------
# GAME config
# --------------------------------------
export GAME_INC = include
export GAME_NAME = core
export GAME_DIR = $(MKFILE_PATH)$(GAME_NAME)
export GAME_EXTENSION = $(EXE_EXTENSION)
# --------------------------------------
# MAKE util
# --------------------------------------
export MAKE = make -C
export MAKEFILE = Makefile.linux
# --------------------------------------
# BUILD utils
# --------------------------------------
export PREFIX :=
export CC := $(PREFIX)gcc
export CXX := $(PREFIX)g++
export AS := $(PREFIX)as
export AR := $(PREFIX)ar
export OBJCOPY := $(PREFIX)objcopy
export STRIP := $(PREFIX)strip
export NM := $(PREFIX)nm
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
ifneq (,$(ISVC))
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
endif
# --------------------------------------
# DEBUG utils
# --------------------------------------
# --------------------------------------
# BUILD rules
# --------------------------------------
%.a:
@echo $(notdir $@)
@rm -f $@
$(AR) -rc $@ $^
%.o: %.cpp
@echo $(notdir $<)
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
# --------------------------------------
%.o: %.c
@echo $(notdir $<)
$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d $(CFLAGS) -c $< -o $@ $(ERROR_FILTER)
# --------------------------------------
%.o: %.m
@echo $(notdir $<)
$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d $(OBJCFLAGS) -c $< -o $@ $(ERROR_FILTER)
# --------------------------------------
%.o: %.s
@echo $(notdir $<)
$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ $(ERROR_FILTER)
# --------------------------------------
%.o: %.S
@echo $(notdir $<)
$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ $(ERROR_FILTER)
# --------------------------------------
%.elf:
@echo linking $(notdir $@)
@$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
# --------------------------------------
# SYSTEM DEFINITIONS
# --------------------------------------
include Rules.linux
# --------------------------------------
# NORMAL MAKE EXECUTION
# --------------------------------------
.PHONY: run debug nflib render clean game omitnflib omitrender cleanrender cleannflib cleangame
all: nflib render game
omitnflib: render game
omitrender: game
# --------------------------------------
# NFLIB COMPILATION
# --------------------------------------
nflib:
@echo NFLIB
@$(MAKE) $(NFLIB_DIR) -f $(MAKEFILE) clean
@$(MAKE) $(NFLIB_DIR) -f $(MAKEFILE)
# --------------------------------------
# RENDER COMPILATION
# --------------------------------------
render:
@echo RENDER
@$(MAKE) $(RENDER_DIR) -f $(MAKEFILE) clean all
# --------------------------------------
# GAME COMPILATION
# --------------------------------------
game:
@echo GAME
@$(MAKE) $(GAME_DIR) -f $(MAKEFILE)
# --------------------------------------
# FULL PROJECT CLEAN
# --------------------------------------
clean: cleanrender cleannflib cleangame
cleanrender:
@$(MAKE) $(RENDER_DIR) -f $(MAKEFILE) clean
cleannflib:
@$(MAKE) $(NFLIB_DIR) -f $(MAKEFILE) clean
cleangame:
@$(MAKE) $(GAME_DIR) -f $(MAKEFILE) clean
# --------------------------------------
# PROJECT TESTING PURPOSES
# --------------------------------------
run: debug
debug:
@$(MAKE) $(GAME_DIR) -f $(MAKEFILE) run
# --------------------------------------
# PROJECT DEBUG UTILS LAUNCHING
# --------------------------------------
addr2line:
@$(A2L) $(A2L_FLAGS)
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
include $(MKFILE_PATH)Rules.linux
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header files
#---------------------------------------------------------------------------------
TARGET := $(NFLIB_NAME)
BUILD := build
SOURCES := win/source win/source/libnds win/source/libnds/nds win/source/libnds/nds/arm9
DATA := data
INCLUDES := $(NFLIB_INC)
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS := -g -Wall -O2\
-fomit-frame-pointer -ffast-math \
CFLAGS += $(INCLUDE) -D$(PLATFORM_DEF) -Wno-unused-result
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=c++11
ASFLAGS := -g $(ARCH)
LDFLAGS = -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(LIBNDS)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/lib/lib$(TARGET).a
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
export LD := $(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
export LD := $(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) $(SDL_CFLAGS)
.PHONY: $(BUILD) clean all
#---------------------------------------------------------------------------------
all: $(BUILD)
lib:
@[ -d $@ ] || mkdir -p $@
$(BUILD): lib
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/$(MAKEFILE)
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) lib
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT) : $(OFILES)
#---------------------------------------------------------------------------------
%.bin.o : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
include $(MKFILE_PATH)Rules.linux
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header files
#---------------------------------------------------------------------------------
TARGET := $(RENDER_NAME)
BUILD := build
SOURCES := win/source
DATA := data
INCLUDES := $(RENDER_INC)
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS := -g -Wall -O2\
-fomit-frame-pointer -ffast-math \
CFLAGS += $(INCLUDE) -D$(PLATFORM_DEF) -Wno-unused-result
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=c++11
ASFLAGS := -g $(ARCH)
LDFLAGS = -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(LIBNDS) $(GAME_DIR)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/lib/lib$(TARGET).a
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
export LD := $(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
export LD := $(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
$(foreach dir,$(NFLIB_INC),-I$(NFLIB_DIR)/$(dir)) \
-I$(CURDIR)/$(BUILD) $(SDL_CFLAGS)
.PHONY: $(BUILD) clean all
#---------------------------------------------------------------------------------
all: $(BUILD)
lib:
@[ -d $@ ] || mkdir -p $@
$(BUILD): lib
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/$(MAKEFILE)
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) lib
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT) : $(OFILES)
#---------------------------------------------------------------------------------
%.bin.o : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------
# Makefile for NightFox's Lib Projects
# Modified By Almamu
#
# Changelog:
# Support for paths defined from superior Makefiles added
# This should make the compilation more dynamic and easy to maintain
#---------------------------------------------------------------------------------
#---------------------------------------------------------------------------------
# Compilation Options
#---------------------------------------------------------------------------------
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
include $(MKFILE_PATH)Rules.linux
#---------------------------------------------------------------------------------
%.nds: %.elf
@ndstool -c $@ -9 $< -b $(GAME_ICON) "$(GAME_TITLE);$(GAME_SUBTITLE1);$(GAME_SUBTITLE2)" $(_ADDFILES)
@echo built ... $(notdir $@)
#---------------------------------------------------------------------------------
%.elf:
@echo linking $(notdir $@)
$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
# DATA is a list of directories containing binary files embedded using bin2o
# GRAPHICS is a list of directories containing image files to be converted with grit
#---------------------------------------------------------------------------------
TARGET := $(GAME_NAME)
BUILD := build
SOURCES := source
INCLUDES := $(GAME_INC)
DATA := data
GRAPHICS := gfx
NITRODATA := nitrofiles
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS := -g -Wall -O2 -fomit-frame-pointer\
-ffast-math -Wformat=0
CFLAGS += $(INCLUDE) -D$(PLATFORM_DEF)
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -fpermissive -std=c++11
ASFLAGS := -g $(ARCH)
LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $*.map) $(SDL_DFLAGS)
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -l$(RENDER_NAME) -l$(NFLIB_NAME)
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(LIBNDS) $(NFLIB_DIR) $(RENDER_DIR)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
$(foreach dir,$(GRAPHICS),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
ifneq ($(strip $(NITRODATA)),)
export NITRO_FILES := $(CURDIR)/$(NITRODATA)
endif
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
PNGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.png)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
export LD := $(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
export LD := $(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(addsuffix .o,$(PNGFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(GAME_DIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
$(foreach dir,$(RENDER_INC),-I$(RENDER_DIR)/$(dir)) \
$(foreach dir,$(NFLIB_INC),-I$(NFLIB_DIR)/$(dir)) \
-I$(CURDIR)/$(BUILD) $(SDL_CFLAGS)
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
icons := $(wildcard *.bmp)
ifneq (,$(findstring $(TARGET).bmp,$(icons)))
export GAME_ICON := $(CURDIR)/$(TARGET).bmp
else
ifneq (,$(findstring icon.bmp,$(icons)))
export GAME_ICON := $(CURDIR)/icon.bmp
endif
endif
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/$(MAKEFILE)
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(TARGET).elf $(TARGET).nds $(TARGET).arm9
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).nds : $(OUTPUT).elf
$(OUTPUT).elf : $(OFILES)
#---------------------------------------------------------------------------------
%.bin.o : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
$(bin2o)
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------
Cita de: kamsky en 6 Mayo 2010, 22:15 PMOk, muxas gracias, solo una ultima pregunta. ¿Algun Sniffer para Windows que se pueda iniciar de manera oculta que guarde un archivo cada cierto tiempo de lo lee de la red para luego yo subirlo por FTP en C(por ejemplo)?
no, para poder sniffar tienes que estar en la misma LAN