# bubblemon configuration
EXTRA = -DENABLE_DUCK
EXTRA += -DENABLE_CPU
EXTRA += -DENABLE_MEMSCREEN
EXTRA += -DKERNEL_26
# EXTRA += -DKDE_DOCKAPP
# EXTRA += -DUPSIDE_DOWN_DUCK
# where to install this program
PREFIX = /usr/X11R6
# no user serviceable parts below
EXTRA += $(WMAN)
# optimization cflags
CFLAGS = -fno-common -Wall `/usr/local/bin/gtk12-config --cflags` ${EXTRA}
# profiling cflags
# CFLAGS = -ansi -Wall -pg -O3 `/usr/local/bin/gtk12-config --cflags` ${EXTRA} -DPRO
# test coverage cflags
# CFLAGS = -fprofile-arcs -ftest-coverage -Wall -ansi -g `/usr/local/bin/gtk12-config --cflags` ${EXTRA} -DPRO
SHELL=sh
OS = $(shell uname -s)
OBJS = bubblemon.o
CC = cc
# special things for Linux
ifeq ($(OS), Linux)
OBJS += sys_linux.o
LIBS = `/usr/local/bin/gtk12-config --libs | sed "s/-lgtk-1.2//g"`
INSTALL = -m 755
endif
# special things for FreeBSD
ifeq ($(OS), FreeBSD)
OBJS += sys_freebsd.o
LIBS = `/usr/local/bin/gtk12-config --libs | sed "s/-lgtk-1.2//g"` -lkvm
INSTALL = -s -c -g kmem -m 2755 -o root
endif
# special things for OpenBSD
ifeq ($(OS), OpenBSD)
OBJS += sys_openbsd.o
LIBS = `/usr/local/bin/gtk12-config --libs | sed "s/-lgtk-1.2//g"`
endif
#special things for SunOS
ifeq ($(OS), SunOS)
# try to detect if gcc is available (also works if you call gmake CC=cc to
# select the sun compilers on a system with both)
COMPILER=$(shell \
if [ `$(CC) -v 2>&1 | egrep -c '(gcc|egcs|g\+\+)'` = 0 ]; then \
echo suncc; else echo gcc; fi)
# if not, fix up CC and the CFLAGS for the Sun compiler
ifeq ($(COMPILER), suncc)
CC=cc
CFLAGS=-v -xO3
endif
ifeq ($(COMPILER), gcc)
CFLAGS=-O3 -Wall
endif
CFLAGS +=`/usr/local/bin/gtk12-config --cflags` ${EXTRA}
OBJS += sys_sunos.o
LIBS = `/usr/local/bin/gtk12-config --libs` -lkstat -lm
INSTALL = -m 755
endif
all: bubblemon
bubblemon: $(OBJS)
$(CC) $(CFLAGS) -o bubblemon $(OBJS) $(LIBS)
clean:
rm -f bubblemon *.o *.bb* *.gcov gmon.* *.da *~
install:
install $(INSTALL) bubblemon $(PREFIX)/bin
syntax highlighted by Code2HTML, v. 0.9.1