Some Linux ajustments

This commit is contained in:
Naim A 2016-01-23 15:08:30 -08:00
parent 1db33eb0b6
commit 81d4ad1ae8
3 changed files with 12 additions and 13 deletions

View file

@ -18,23 +18,22 @@
#
objects = main.o udpTracker.o database.o driver_sqlite.o \
settings.o tools.o httpserver.o webapp.o \
logging.o
tools.o httpserver.o webapp.o logging.o
target = udpt
%.o: src/%.c
$(CC) -c -o $@ $< $(CFLAGS)
%.o: src/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
$(CXX) -g -std=gnu++11 -c -o $@ $< $(CXXFLAGS)
%.o: src/db/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
$(CXX) -g -std=gnu++11 -c -o $@ $< $(CXXFLAGS)
%.o: src/http/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
$(CXX) -g -std=gnu++11 -c -o $@ $< $(CXXFLAGS)
all: $(target)
$(target): $(objects)
@echo Linking...
$(CXX) -O3 -o $(target) $(objects) $(LDFLAGS) -lsqlite3 -lpthread
$(CXX) -O3 -o $(target) $(objects) $(LDFLAGS) -lboost_program_options -lsqlite3 -lpthread
@echo Done.
clean:
@echo Cleaning Up...

View file

@ -9,7 +9,7 @@ UDPT is designed to run on both Windows and Linux-based platform (It may run on
### License
UDPT is released under the [GPL](http://www.gnu.org/licenses/gpl-3.0.en.html) license, a copy is included in this repository.
We use [SQLite3](http://www.sqlite.org/) which is public-domain.
We use [SQLite3](http://www.sqlite.org/) which is public-domain, and [Boost](http://www.boost.org/) which is released under the [boost license](http://www.boost.org/LICENSE_1_0.txt).
### Building
We didn't really work on creating any installer, at the moment you can just run udpt from anywhere on your filesystem.

View file

@ -106,12 +106,12 @@ namespace UDPT
void UDPTracker::wait()
{
#ifdef WIN32
WaitForMultipleObjects(this->m_threadCount, this->m_threads, TRUE, INFINITE);
::WaitForMultipleObjects(this->m_threadCount, this->m_threads, TRUE, INFINITE);
#else
int i;
for (i = 0;i < this->m_threadCount; i++)
{
pthread_join (this->m_threads[i], NULL);
::pthread_join(this->m_threads[i], NULL);
}
#endif
}