# -*- mode: shell-script -*-
#
######################################################
MAKEFILE= Makefile
######################################################

TOP=..

include ../Make.conf

.SUFFIXES : .c $(O)

FLAGS_GTK =   -Wall `pkg-config --cflags  gtk+-2.0` -DWITH_GTK 
LIBS_GTK = `pkg-config --libs gtk+-2.0` 

CFLAGS = $(CFLAGS0) -I$(TOP)   $(T1_INC)   $(FLAGS_GTK)


PREFS= -DCCOMPILER=\"'$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS)'\"  \
	-DGRACE_PRINT_CMD=\"$(PRINT_CMD)\"



INSTALL	      = cp

LD	      = $(CC)


OBJS	      = buildinfo.o

SRCS	      = buildinfo.c

######################################################

all:		buildinfo.h


buildinfo$(EXE) : buildinfo$(O)
	$(CC) $(CFLAGS) $? -o $@ $(LDFLAGS) $(GUI_LIBS) $(T1_LIB) $(JPEG_LIB) \
	    $(PNG_LIB) $(Z_LIB) $(NOGUI_LIBS) $(FFTW3_LIB) $(FFTW_LIB)

buildinfo$(O) : $(TOP)/Make.conf
	$(CC) $(CFLAGS) $(PREFS) -c buildinfo.c -o $@

buildinfo.h : buildinfo$(EXE) $(GRSRCS) $(GUISRCS) 
	$(RM) t.h
	./buildinfo$(EXE) > t.h
	cp t.h ../src/buildinfo.h
	mv t.h $@


clean:;		@rm -f $(OBJS) core  

distclean:;      @rm -f $(OBJS) core buildinfo$(EXE) buildinfo$(O) buildinfo.h *~

tests : dummy

links : dummy

install : dummy

dummy :


# DO NOT DELETE THIS LINE - used by make depend
buildinfo.h : buildinfo$(EXE) 
buildinfo$(EXE) : buildinfo$(O)
buildinfo$(O) : buildinfo.c
