include ../Makefile.inc ARCH := $(patsubst i%86,i386,$(shell uname -m)) ARCH := $(patsubst sparc%,sparc,$(ARCH)) DEBUGFLAGS = -g -O #DEBUGFLAGS += -D__FDISK_ALLOC_DEBUG__ CFLAGS = -Wall $(DEBUGFLAGS) $(INCLUDEPATH) -D_GNU_SOURCE=1 -fPIC -I../isys -DENABLE_NLS -I/usr/include/python1.5 LDFLAGS = $(LIBPATH) ifeq ($(ARCH),i386) CFLAGS += -I../edd LDFLAGS += -L../edd -ledd endif ifeq ($(ARCH),alpha) CFLAGS += -O2 endif AR = ar RANLIB = ranlib LIBFDISK = libfdisk.a OBJECTS = alloc.o constraints.o extended.o rawio.o primary.o \ errlist.o partition.o partspec.o SOURCES = alloc.c extended.c rawio.c primary.c partition.c \ errlist.c partspec.c constraints.c GNOMEPYFSEDIT=gnomepyfsedit.so CFLAGS+=`gnome-config --cflags gnomeui gtk` CFLAGS+=`glib-config --cflags gthread` GLDFLAGS+=`gnome-config --libs gnomeui gtk` ifeq (.depend,$(wildcard .depend)) TARGET=all else TARGET=depend all endif everything: $(TARGET) all: $(LIBFDISK) testfdisk newtpyfsedit.so $(GNOMEPYFSEDIT) install: all install -s newtpyfsedit.so $(GNOMEPYFSEDIT) $(DESTDIR)/$(PYTHONLIBDIR) testfdisk: testfdisk.o $(LIBFDISK) gcc -o testfdisk testfdisk.o $(LIBFDISK) $(LDFLAGS) $(LIBFDISK): $(LIBFDISK)($(OBJECTS)) testfdisk.o: testfdisk.c gnomefsedit.o: gnomefsedit.c gnomefsedit.h fsedit.h $(CC) $(CFLAGS) -c gnomefsedit.c newtpyfsedit.so: newtpyfsedit.o fsedit.o fstab.o newtfsedit.o libfdisk.a gcc -shared -g -o $@ $^ -L. -lfdisk $(LDFLAGS) gnomepyfsedit.o: pyfsedit.c gcc -DINITFN=initgnomepyfsedit -DNAME=\"gnomepyfsedit\" -DGNOME -c $(CFLAGS) -I/usr/include/python1.5 `gtk-config --cflags` -o $@ $^ gnomepyfsedit.so: gnomepyfsedit.o fsedit.o fstab.o gnomefsedit.o libfdisk.a gcc -shared -g $(GLDFLAGS) $(LDFLAGS) -o $@ $^ -L. -lfdisk newtpyfsedit.o: pyfsedit.c gcc -DINITFN=initnewtpyfsedit -DNAME=\"newtpyfsedit\" -c $(CFLAGS) -I/usr/include/python1.5 -o $@ $^ clean: rm -f *.o *.so *.a *~ core testfdisk testfdisk.o printerrors depend: $(CPP) -M $(CFLAGS) *.c > .depend ifeq (.depend,$(wildcard .depend)) include .depend endif