Commit f43221a8 authored by Moritz Lipp's avatar Moritz Lipp

Initial commit

parents
Copyright (c) 2010 pwmt.org
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
distribution.
# See LICENSE file for license and copyright information
PROJECT = girara
SOURCE = girara.c
OBJECTS = ${SOURCE:.c=.o}
DOBJECTS = ${SOURCE:.c=.do}
include config.mk
all: options ${PROJECT}
make -C examples
options:
@echo ${PROJECT} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}"
%.o: %.c
@echo CC $<
@${CC} -c ${CFLAGS} -o $@ $<
%.do: %.c
@echo CC $<
@${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $<
${OBJECTS}: girara.c config.mk
${DOBJECTS}: girara.c config.mk
${PROJECT}: ${OBJECTS}
@echo AR rcs $@
@ar rcs lib${PROJECT}.a $(OBJECTS)
clean:
@rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
${DOBJECTS} ${PROJECT}-debug lib${PROJECT}.a
@make -C examples clean
${PROJECT}-debug: ${DOBJECTS}
@echo AR rcs $@
@ar rc lib${PROJECT}.a $(DOBJECTS)
debug: ${PROJECT}-debug
valgrind: debug
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \
./${PROJECT}-debug
gdb: debug
cgdb ${PROJECT}-debug
dist: clean
@mkdir -p ${PROJECT}-${VERSION}
@cp -R LICENSE Makefile config.mk 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
uninstall:
@echo removing library file
@rm -f ${PREFIX}/lib/lib${PROJECT}.a
@echo removing include file
@rm -f ${PREFIX}/include/girara.h
girara
======
# 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
DFLAGS = -g
# compiler
CC ?= gcc
# strip
SFLAGS = -s
# See LICENSE file for license and copyright information
include ../config.mk
SOURCE =
OBJECTS = ${SOURCE:.c=}
all: options ${OBJECTS}
options:
@echo ${PROJECT} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}"
%: %.c
@echo CC $<
@${CC} ${CFLAGS} -o $@ $< ../${ITLIB}
${OBJECTS}: ../config.mk
clean:
@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;
#endif
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