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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
SOURCES = cccd.c cd.c cddb.c cddbp.c info.c options.c misc.c
HEADERS = $(SOURCES:.c=.h) general.h icons.h
OBJECTS = cccd.o cd.o cddb.o cddbp.o info.o options.o misc.o
OTHERS = Makefile CHANGES README TODO README.original BUGREPORT COPYING
TARGET = cccd
CC = gcc
# you may need to change this
MAILPROG = "/usr/bin/mail -i"
# If $(TARGET) spits out too many debug messages, remove -DDEBUG from
# next line
CFLAGS = -O2 -Wall `gtk-config --cflags`
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g -DDEBUG
endif
#LDFLAGS = -lefence `gtk-config --libs`
LDFLAGS = `gtk-config --libs`
# production flags (no debugging)
#CFLAGS = -O2 -Wall `gtk-config --cflags`
#LDFLAGS = -s `gtk-config --libs`
prefix=/usr/local
bindir=$(prefix)/bin
mandir=$(prefix)/man/man1
CFLAGS += -DMAILPROG="\"/usr/bin/mail -i\""
.SUFFIXES: .c
.c.o: $(CC) -c $(CFLAGS) $<
all: $(TARGET)
$(TARGET): $(OBJECTS)
gcc -o $(TARGET) $(OBJECTS) $(CFLAGS) $(LDFLAGS)
install: $(TARGET)
mkdir -p $(bindir)
install -c -m 0755 cccd $(bindir)
mkdir -p $(mandir)
install -c -m 0644 cccd.1 $(mandir)
@echo "Please read the README for additional installation hints"
static: $(OBJECTS)
# gcc -o $(TARGET).static $(OBJECTS) -L/usr/lib -L/usr/X11R6/lib -Wl,-Bstatic -lgtk -lgdk -lglib -Wl,-Bdynamic -lXext -lX11 -lm
gcc -static -o $(TARGET).static $(OBJECTS) -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11 -lm
clean:
rm -rf core *.o $(TARGET)
# dependencies, gcc `gtk-config --cflags` -MM *.c
cccd.o: cccd.c general.h misc.h cd.h options.h cddb.h info.h cccd.h \
icons.h
cd.o: cd.c cd.h
cddb.o: cddb.c general.h cd.h cddbp.h misc.h options.h cddb.h
cddbp.o: cddbp.c misc.h cddbp.h
info.o: info.c general.h misc.h cd.h cddb.h options.h cccd.h info.h
misc.o: misc.c
options.o: options.c general.h misc.h options.h
|