2012-12-07 01:39:01 +00:00
|
|
|
#
|
2013-03-08 14:04:49 +00:00
|
|
|
# Copyright © 2012,2013 Naim A.
|
2012-12-07 01:39:01 +00:00
|
|
|
#
|
|
|
|
# This file is part of UDPT.
|
|
|
|
#
|
|
|
|
# UDPT is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# UDPT is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with UDPT. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2013-03-08 14:04:49 +00:00
|
|
|
objects = main.o udpTracker.o database.o driver_sqlite.o \
|
2016-02-05 00:13:55 +00:00
|
|
|
tools.o httpserver.o webapp.o tracker.o
|
2013-03-08 14:04:49 +00:00
|
|
|
target = udpt
|
2016-02-08 20:42:58 +00:00
|
|
|
CXXFLAGS = -DBOOST_LOG_DYN_LINK
|
2012-12-07 01:39:01 +00:00
|
|
|
|
2013-03-08 14:04:49 +00:00
|
|
|
%.o: src/%.c
|
|
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
%.o: src/%.cpp
|
2016-01-23 23:08:30 +00:00
|
|
|
$(CXX) -g -std=gnu++11 -c -o $@ $< $(CXXFLAGS)
|
2013-03-08 14:04:49 +00:00
|
|
|
%.o: src/db/%.cpp
|
2016-01-23 23:08:30 +00:00
|
|
|
$(CXX) -g -std=gnu++11 -c -o $@ $< $(CXXFLAGS)
|
2013-03-22 12:21:00 +00:00
|
|
|
%.o: src/http/%.cpp
|
2016-01-23 23:08:30 +00:00
|
|
|
$(CXX) -g -std=gnu++11 -c -o $@ $< $(CXXFLAGS)
|
2013-03-08 14:04:49 +00:00
|
|
|
all: $(target)
|
2012-12-07 01:39:01 +00:00
|
|
|
|
2013-03-08 14:04:49 +00:00
|
|
|
$(target): $(objects)
|
|
|
|
@echo Linking...
|
2016-02-08 20:42:58 +00:00
|
|
|
$(CXX) -O3 -o $(target) $(objects) $(LDFLAGS) -lboost_program_options -lsqlite3 -lpthread -lboost_thread -lboost_system -lboost_log
|
2013-03-08 14:04:49 +00:00
|
|
|
@echo Done.
|
2012-12-07 01:39:01 +00:00
|
|
|
clean:
|
2013-03-08 14:04:49 +00:00
|
|
|
@echo Cleaning Up...
|
|
|
|
$(RM) $(objects) $(target)
|
|
|
|
@echo Done.
|
|
|
|
|