Commit f43221a8 authored by Moritz Lipp's avatar Moritz Lipp

Initial commit

Copyright (c) 2010
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
# See LICENSE file for license and copyright information
PROJECT = girara
SOURCE = girara.c
all: options ${PROJECT}
make -C examples
@echo ${PROJECT} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}"
%.o: %.c
@echo CC $<
@${CC} -c ${CFLAGS} -o $@ $< %.c
@echo CC $<
@${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $<
${OBJECTS}: girara.c
${DOBJECTS}: girara.c
@echo AR rcs $@
@ar rcs lib${PROJECT}.a $(OBJECTS)
@rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
${DOBJECTS} ${PROJECT}-debug lib${PROJECT}.a
@make -C examples clean
@echo AR rcs $@
@ar rc lib${PROJECT}.a $(DOBJECTS)
debug: ${PROJECT}-debug
valgrind: debug
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \
gdb: debug
cgdb ${PROJECT}-debug
dist: clean
@mkdir -p ${PROJECT}-${VERSION}
@cp -R LICENSE Makefile README \
girara.h ${SOURCE} examples/ ${PROJECT}-${VERSION}
@tar -cf ${PROJECT}-${VERSION}.tar ${PROJECT}-${VERSION}
@gzip ${PROJECT}-${VERSION}.tar
@rm -rf ${PROJECT}-${VERSION}
install: all
@echo installing library file
@mkdir -p ${DESTDIR}${PREFIX}/lib
@cp -f lib${PROJECT}.a ${DESTDIR}${PREFIX}/lib
@echo installing header file
@mkdir -p ${DESTDIR}${PREFIX}/include
@cp -f girara.h ${DESTDIR}${PREFIX}/include
@echo removing library file
@rm -f ${PREFIX}/lib/lib${PROJECT}.a
@echo removing include file
@rm -f ${PREFIX}/include/girara.h
# See LICENSE file for license and copyright information
VERSION = 0.0.0
# paths
PREFIX ?= /usr
# libs
GTK_INC = $(shell pkg-config --cflags gtk+-2.0)
GTK_LIB = $(shell pkg-config --libs gtk+-2.0)
INCS = -I. -I/usr/include ${GTK_INC}
LIBS = -lc ${GTK_LIB}
# flags
CFLAGS += -std=c99 -pedantic -Wall -Wno-format-zero-length $(INCS)
# debug
# compiler
CC ?= gcc
# strip
# See LICENSE file for license and copyright information
include ../
all: options ${OBJECTS}
@echo ${PROJECT} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}"
%: %.c
@echo CC $<
@${CC} ${CFLAGS} -o $@ $< ../${ITLIB}
${OBJECTS}: ../
@rm -rf ${OBJECTS}
/* See LICENSE file for license and copyright information */
#include "girara.h"
#ifndef GIRARA_H
#define GIRARA_H
typedef struct girara_session_s girara_session_t;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment