GTK2_CFLAGS=`pkg-config gtk+-2.0 --cflags`
GTK2_LIBS=`pkg-config gtk+-2.0 --libs`
OBJS=hinet_radio.o eggtrayicon.o
PREFIX=/usr
all: $(OBJS)
cc -o hinet_radio $(GTK2_LIBS) $(OBJS)
hinet_radio.o: hinet_radio.c
cc -c $(GTK2_CFLAGS) hinet_radio.c
eggtrayicon.o: eggtrayicon.c eggtrayicon.h
cc -c $(GTK2_CFLAGS) -DEGG_COMPILATION eggtrayicon.c
clean:
rm -f hinet_radio
rm -f *.o
install: all
install -s hinet_radio $(PREFIX)/bin/hinet_radio
=================================
GCC=gcc
CFLAGS=-c
IFLAGS=-I.
OBJS=t.o
.SUFFIXES: .c .o
.c.o:
$(GCC) $(CFLAGS) $(IFLAGS) $*.c
all: t
t: $(OBJS)
@echo Linking $@...
$(GCC) -o $@ $?
@echo "##### $@ loaded #####"
clean:
rm -f *.o
没有评论:
发表评论