automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help to create automake


From: Rudra Banerjee
Subject: help to create automake
Date: Tue, 02 Oct 2012 14:40:19 +0100

Dear Friends,
My Project has a structure
                  MAIN DIR
          __________|__________
         |                     |
        src/         main.c (and other .h file)

Inside the src/ there are 100+ file, which will be linked to main.c to
create the executable. So, there will be *NO* executable in src.

For this goal, my manually created Makefile is:

exe=ptbl
CC=gcc
CFLAGS =-O3
SUBDIR=files
PCONF1=pkg-config --cflags --libs gtk+-2.0
sources := $(wildcard $(SUBDIR)/*.c)
objects := $(sources:.c=.o)
$(exe): $(objects) help.c  table.c  callbk_list.h  cwlst.h
        $(CC) `$(PCONF1)` $(objects) help.c  table.c -o $(exe)

$(SUBDIR)/%.o: $(SUBDIR)/%.c
        $(CC) -c `$(PCONF1)` $<
        mv $(*F).o $(SUBDIR)/$(*D)

clean:
        rm -vf $(SUBDIR)/*.o $(exe)

I would like to achive the same goal using autotools.
I googled, but all seems to assume there is a executable in each
directory, like each, for me, src/Makefile.am *MUST* have a bin_PROGRAM,
which is *NOT* what I am looking for.
Can you kindly help me?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]