1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
# Install variables
prefix=@prefix@
#Pilot flags (include dir), and Libraries
PILOT_FLAGS=@PILOT_FLAGS@
PILOT_LIBS=@PILOT_LIBS@
#set CC to your compiler
CC = @CC@
# CC options
CCDEFINES = @DEFS@
CFLAGS = @cflags@
# CC options
OPTIONS = @ccoptions@ $(CFLAGS)
# GTK+ flags
GTKFLAGS = @GTK_CFLAGS@
# GTK+ libs
GTKLIBS = @GTK_LIBS@
# Targets
all: libexpense.so
libexpense.so: expense.o libplugin.a
ld -shared -ldl -o libexpense.so expense.o -L. -lplugin
expense.o: expense.c libplugin.h
$(CC) $(OPTIONS) $(GTKFLAGS) $(PILOT_FLAGS) -c expense.c
clean:
rm -f *.o *~ config.cache
distclean: clean
rm -f config.status config.log *.so Makefile
#
# This is a global install. You can also install per user in
# ~/.jpilot/plugins
#
install:
./install-sh -d -m 755 $(prefix)/share/jpilot/plugins
./install-sh -c -m 755 -g bin -o bin libexpense.so \
$(prefix)/share/jpilot/plugins
uninstall:
rm $(prefix)/share/jpilot/plugins/libexpense.so
|