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
|
# yes, I know this is the weakest Makefile ever, but it is sufficient
# for my purposes; i.e., writing and releasing this in a day.
mode = debug
prefix = /usr/local
bindir = ${prefix}/bin
sharedir = ${prefix}/share
etcdir = ${prefix}/etc
ccFlags_release = -O3
ccFlags_debug = -g
ccFlags = ${ccFlags_${mode}} -c
cppFlags = $(shell gnome-config --cflags applets)
# was: -I/usr/lib/glib/include -I/usr/lib/gnome-libs/include
ldFlags_release =
ldFlags_debug = -g
ldFlags = ${ldFlags_${mode}}
ldLibs = $(shell gnome-config --libs applets)
# was: -lgtk -lgdk -lgnome -lgnomesupport -lgnomeui -lpanel_applet -lart_lgpl -lgnorba
srcs = merlin-clock.c properties.c session.c
objs = ${srcs:.c=.o}
target = merlin-clock_applet
.PHONY: clean
${target}: ${objs}
gcc ${ldFlags} $^ ${ldLibs} -o $@
%.o: %.c
gcc ${ccFlags} ${cppFlags} $< -o $@
clean:
rm -f ${objs} ${target}
install: ${target}
install -c -D -m755 ${target} ${bindir}/${target}
install -c -D -m644 ${target}.gnorba ${etcdir}/CORBA/servers/${target}.gnorba
install -c -D -m644 ${target}.desktop ${sharedir}/applets/Clocks/${target}.desktop
|