iPDC-suite/iPDC/Makefile

97 lines
3.1 KiB
Makefile
Raw Permalink Normal View History

2022-07-12 01:08:04 +05:30
# -----------------------------------------------------------------------------
# Makefile for building iPDC
# iPDC - Phasor Data Concentrator
#
# Copyright (C) 2011 Nitesh Pandit
# Copyright (C) 2011 Kedar V. Khandeparkar
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Authors:
# Nitesh Pandit <panditnitesh@gmail.com>
# Kedar V. Khandeparkar <kedar.khandeparkar@gmail.com>
#
# -----------------------------------------------------------------------------
SHELL = /bin/sh
prefix = /usr/local
includedir = /usr/src/include
INSTALL = /usr/bin/install -c
INSTALL_PREFIX = /usr/local/
CREATE_DIR = /usr/local/share/
DESKTOP_DIR = /usr/share/applications
2022-11-12 11:56:50 +05:30
FILE1 = iPDC.ui
2022-07-12 01:08:04 +05:30
FILE2 = ipdcLogo.png
FILE3 = PSLab.PNG
FILE4 = ipdcLogo1.png
FILE5 = logo.png
FILE6 = iPDC.desktop
2022-11-12 11:56:50 +05:30
FILE7 = utility_tools.ui
FILE8 = red.png
FILE9 = green.png
FILE11 = blue.png
FILE13 = grey.png
SOLIB = lib
2022-07-12 01:08:04 +05:30
2022-08-11 15:24:41 +05:30
2022-07-12 01:08:04 +05:30
CC = gcc
LIBS = -lpthread
2022-11-12 11:56:50 +05:30
LDLIBS=`pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8` lib/liblivechart.so lib/liblivechart_static.a -Wl,--rpath=$(CREATE_DIR)iPDC/$(SOLIB)
2022-10-19 16:55:48 +05:30
CFLAGS=-g -I./inc -I./lib -fcommon `pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8`
2022-07-12 01:08:04 +05:30
PROGRAM = iPDC
2022-10-02 21:42:04 +05:30
SOURCE_FILES = $(wildcard src/*.c)
OBJECT_FILES = $(patsubst src/%.c, bin/%.o, $(SOURCE_FILES))
CLEAN_OBJECTS = $(wildcard bin/*.o) $(PROGRAM)
all: $(PROGRAM)
2022-07-12 01:08:04 +05:30
2022-10-02 21:42:04 +05:30
$(PROGRAM): $(OBJECT_FILES)
2022-10-24 20:30:30 +05:30
$(CC) $(CFLAGS) $(OBJECT_FILES) -o $(PROGRAM) $(LDLIBS) -lm
2022-07-12 01:08:04 +05:30
2022-10-02 21:42:04 +05:30
bin/%.o: src/%.c
$(CC) $(CFLAGS) -c $< -o $@
2022-07-12 01:08:04 +05:30
install: $(PROGRAM)
2022-11-12 12:13:59 +05:30
mkdir -p $(CREATE_DIR)iPDC/
2022-10-02 21:42:04 +05:30
cp -f assets/$(FILE1) $(CREATE_DIR)iPDC/$(FILE1)
cp -f assets/$(FILE2) $(CREATE_DIR)iPDC/$(FILE2)
cp -f assets/$(FILE3) $(CREATE_DIR)iPDC/$(FILE3)
cp -f assets/$(FILE4) $(CREATE_DIR)iPDC/$(FILE4)
cp -f assets/$(FILE5) $(CREATE_DIR)iPDC/$(FILE5)
2022-11-12 11:56:50 +05:30
cp -f assets/$(FILE7) $(CREATE_DIR)iPDC/$(FILE7)
cp -f assets/$(FILE8) $(CREATE_DIR)iPDC/$(FILE8)
cp -f assets/$(FILE9) $(CREATE_DIR)iPDC/$(FILE9)
cp -f assets/$(FILE11) $(CREATE_DIR)iPDC/$(FILE11)
cp -f assets/$(FILE13) $(CREATE_DIR)iPDC/$(FILE13)
2022-10-02 21:42:04 +05:30
cp -f assets/$(FILE6) $(DESKTOP_DIR)/$(FILE6)
2022-11-12 11:56:50 +05:30
cp -r -f lib/ $(CREATE_DIR)iPDC/$(SOLIB)
2022-07-12 01:08:04 +05:30
cp $(PROGRAM) $(INSTALL_PREFIX)bin/$(PROGRAM)
uninstall:
rm -f $(INSTALL_PREFIX)bin/$(PROGRAM)
rm -rf $(CREATE_DIR)iPDC$
rm -rf $(DESKTOP_DIR)/$(FILE6)
rm -f $(CLEAN_OBJECTS) $(PROGRAM)
clean:
rm -f $(CLEAN_OBJECTS) $(PROGRAM)