Jump to content
×
×
  • Create New...
  • 0

1 Problem about mainline_released


Kid0

Question

  • Answers 11
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

11 answers to this question

Recommended Posts

  • 0

Edit your Makefile:

SVN_VERSION = $(shell svnversion -n .)

to

SVN_VERSION = 1337
$(OBJDIR)/version.o: version.cpp
@$(CC) $(CFLAGS) -D__USER__="$(USER)" -D__HOSTNAME__="$(HOSTNAME)" -D__PWD__="$(PWD)" -D__P4_VERSION__="$(P4_VERSION)" -c $< -o [email protected]
@echo compile $<

to

$(OBJDIR)/version.o: version.cpp
    @$(CC) $(CFLAGS) -D__P4_VERSION__="$(SVN_VERSION)" -c $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -D__P4_VERSION__="$(SVN_VERSION)" -c $< -o [email protected] @echo compile $<lt; -o [email protected]
    @echo compile $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -D__P4_VERSION__="$(SVN_VERSION)" -c $< -o [email protected] @echo compile $<lt;

And, edit your entire version.cpp with this:

#include <stdio.h>

void WriteVersion()
{
#ifndef __WIN32__
    FILE* fp = fopen("VERSION.txt", "w");

    if (fp)
    {
        fprintf(fp, "game revision: %sn", __SVN_VERSION__);
        fclose(fp);
    }
#endif
}
Link to comment
Share on other sites

  • 0
  • Premium
CC=gcc
CXX=g++

PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1)
BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)

default: libthecore libpoly libgame liblua libsql libserverkey game db
	@echo "--------------------------------------"
	@echo "Build Done"
	@echo "--------------------------------------"

libserverkey: .
	@touch [email protected]/Depend
	$(MAKE) -C [email protected] dep
	$(MAKE) -C [email protected] clean
	$(MAKE) -C [email protected]

liblua: .
	$(MAKE) -C [email protected] clean
	$(MAKE) -C [email protected]

libsql: .
	@touch [email protected]/Depend
	$(MAKE) -C [email protected] dep
	$(MAKE) -C [email protected] clean
	$(MAKE) -C [email protected]

libgame: .
	@touch [email protected]/src/Depend
	$(MAKE) -C [email protected]/src dep
	$(MAKE) -C [email protected]/src clean
	$(MAKE) -C [email protected]/src

libpoly: .
	@touch [email protected]/Depend
	$(MAKE) -C [email protected] dep
	$(MAKE) -C [email protected] clean
	$(MAKE) -C [email protected] 

libthecore: .
	@touch [email protected]/src/Depend
	$(MAKE) -C [email protected]/src dep
	$(MAKE) -C [email protected]/src clean
	$(MAKE) -C [email protected]/src

libserverkey: .
	@touch [email protected]/Depend
	$(MAKE) -C [email protected] dep
	$(MAKE) -C [email protected] clean
	$(MAKE) -C [email protected]

game: .
	@touch [email protected]/src/Depend
	$(MAKE) -C [email protected]/src dep
	$(MAKE) -C [email protected]/src clean
	$(MAKE) -C [email protected]/src limit_time
#	$(MAKE) -C [email protected]/src

db: .
	@touch [email protected]/src/Depend
	$(MAKE) -C [email protected]/src dep
	$(MAKE) -C [email protected]/src clean
#	$(MAKE) -C [email protected]/src

all: 
	@echo "--------------------------------------"
	@echo "Full Build Start"
	@echo "--------------------------------------"

	$(MAKE) -C liblua clean
	$(MAKE) -C liblua

	@touch libsql/Depend
	$(MAKE) -C libsql dep
	$(MAKE) -C libsql clean
	$(MAKE) -C libsql

	@touch libgame/src/Depend
	$(MAKE) -C libgame/src dep
	$(MAKE) -C libgame/src clean
	$(MAKE) -C libgame/src

	@touch libpoly/Depend
	$(MAKE) -C libpoly dep
	$(MAKE) -C libpoly clean
	$(MAKE) -C libpoly 

	@touch libthecore/src/Depend
	$(MAKE) -C libthecore/src dep
	$(MAKE) -C libthecore/src clean
	$(MAKE) -C libthecore/src

	@touch game/src/Depend
	$(MAKE) -C game/src dep
	$(MAKE) -C game/src clean
	$(MAKE) -C game/src limit_time
#	$(MAKE) -C game/src

	@touch db/src/Depend
	$(MAKE) -C db/src dep
	$(MAKE) -C db/src clean
#	$(MAKE) -C db/src

	@echo "--------------------------------------"
	@echo "Full Build End"
	@echo "--------------------------------------"

this is my makefile,he doesn't find

 

SVN_VERSION = $(shell svnversion -n .)
 
you can help me ?
thanks
 
bad english....
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.