udpt/Makefile
2015-11-28 15:37:38 -08:00

44 lines
1.2 KiB
Makefile

#
# Copyright © 2012,2013 Naim A.
#
# 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/>.
#
objects = main.o udpTracker.o database.o driver_sqlite.o \
settings.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)
%.o: src/db/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
%.o: src/http/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
all: $(target)
$(target): $(objects)
@echo Linking...
$(CXX) -O3 -o $(target) $(objects) $(LDFLAGS) -lsqlite3 -lpthread
@echo Done.
clean:
@echo Cleaning Up...
$(RM) $(objects) $(target)
@echo Done.