TARGETS = hayes.so sofia.so PREFIX = /usr/local DESTDIR = LIBDIR = $(PREFIX)/lib CC = cc CPPFLAGSF= -I ../../include CPPFLAGS= CFLAGSF = -W `pkg-config --cflags glib-2.0` CFLAGS = -Wall -g -O2 -pedantic -fPIC AR = ar -rc RANLIB = ranlib LD = $(CC) -shared RM = rm -f LN = ln -f MKDIR = mkdir -p INSTALL = install all: $(TARGETS) hayes_OBJS = hayes.o hayes_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) hayes_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) hayes.so: $(hayes_OBJS) $(LD) -o hayes.so $(hayes_OBJS) $(hayes_LDFLAGS) sofia_OBJS = sofia.o sofia_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) `pkg-config --cflags sofia-sip-ua-glib` sofia_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) `pkg-config --libs sofia-sip-ua-glib` -L $(PREFIX)/lib -Wl,-rpath,$(PREFIX)/lib sofia.so: $(sofia_OBJS) $(LD) -o sofia.so $(sofia_OBJS) $(sofia_LDFLAGS) hayes.o: hayes.c $(CC) $(hayes_CFLAGS) -c hayes.c sofia.o: sofia.c $(CC) $(sofia_CFLAGS) -c sofia.c clean: $(RM) -- $(hayes_OBJS) $(sofia_OBJS) distclean: clean $(RM) -- $(TARGETS) install: $(TARGETS) $(MKDIR) $(DESTDIR)$(LIBDIR)/Phone/modem $(INSTALL) -m 0644 -- hayes.so $(DESTDIR)$(LIBDIR)/Phone/modem/hayes.so $(MKDIR) $(DESTDIR)$(LIBDIR)/Phone/modem $(INSTALL) -m 0644 -- sofia.so $(DESTDIR)$(LIBDIR)/Phone/modem/sofia.so uninstall: $(RM) -- $(DESTDIR)$(LIBDIR)/Phone/modem/hayes.so $(RM) -- $(DESTDIR)$(LIBDIR)/Phone/modem/sofia.so .PHONY: all clean distclean install uninstall