From 0ef79d37aa02b6d0ba28c4414b4e78730b55b6f4 Mon Sep 17 00:00:00 2001 From: Naim A Date: Fri, 7 Dec 2012 03:39:01 +0200 Subject: [PATCH] Added Makefile for Linux & MinGW; Allowing people to build easily from source. --- Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ README | 14 ++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c0f2704 --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# +# Copyright © 2012 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 . +# + +win32: main.o tools.o udpTracker.o driver_sqlite.o + gcc -static -O3 -o udpt.exe main.o tools.o udpTracker.o driver_sqlite.o -lsqlite3 -lws2_32 + +linux: main.o tools.o udpTracker.o driver_sqlite.o + gcc -static -O3 -o udpt main.o tools.o udpTracker.o driver_sqlite.o -lsqlite3 -lpthreads + +main.o: + gcc -c -O3 -o main.o src/main.c + +tools.o: + gcc -c -O3 -o tools.o src/tools.c + +udpTracker.o: + gcc -c -O3 -o udpTracker.o src/udpTracker.c + +driver_sqlite.o: + gcc -O3 -c -o driver_sqlite.o src/db/driver_sqlite.c + +.PHONY: clean +clean: + rm -f udpt.exe main.o tools.o udpTracker.o driver_sqlite.o udpt \ No newline at end of file diff --git a/README b/README index 7a5ec2d..5110a8f 100644 --- a/README +++ b/README @@ -4,6 +4,20 @@ README for the UDPT project. Licensed under GNU GPLv3. The license file is attached under the name gpl.txt. +Compiling under linux or linux environment (MinGW): + +For Windows (with Linux environment): +$ make win32 + +For Linux: +$ make linux + +Running: +$ ./udpt + +Cleaning: +$ make clean + This software currently uses the Sqlite3 Library (public domain). Developed by Naim A. .