[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NU-B question about including other files
From: |
Maya |
Subject: |
NU-B question about including other files |
Date: |
Mon, 26 Jul 2004 13:46:34 -0400 |
I have a list of programs that need to be included in every new Makefile, the
name of this make file is
Make.jme and it looks like this:
# Makefile.jme
# lib to be included
EXCEPTION_H = ../some/directory/exception.hpp
EXCEPTION_C = ../some/directory/exception.cpp
STRTOOLS_H = ../some/directory/strtools.hpp
STRTOOLS_C = ../some/directory/strtools.cpp
IO_BASE_H = ../some/directory/io_base.hpp
IO_BASE_C = ../some/directory/io_base.cpp
# Flagas
JMECFLAGS= -Wall -Wnon-virtual-dtor -g -ansi
# Variables
LIB_OBJS = exception.o strtools.o io_base.o
exception.o: $(EXCEPTION_H)
$(CC) $(JMECFLAGS) -c $(EXCEPTION_C)
strtools.o: $(STRTOOLS_H)
$(CC) $(JMECFLAGS) -c $(STRTOOLS_C)
io_base.o: $(IO_BASE_H)
$(CC) $(JMECFLAGS) -c $(IO_BASE_C)
--------- eof -----------
I also have a "Makefile" in this Makefile I make a call to 'include' the
"Makefile.jme" and it looks like this:
# name Makefile
# Compiler name
CPP=g++
# Libraries to be included
include Makefile.jme
# Flagas
CFLAGS= -Wall -Wnon-virtual-dtor -g -ansi
# Variables
OBJS = test.o
EXEC = Test
#Application name
my_app: $(OBJS) $(LIB_OBJS )
$(CPP) $(LDLIBS) $(OBJS) -o $(EXEC)
main.o: test.cpp
$(CPP) $(CFLAGS) -c test.cpp
clean:
rm -f *.o
rm -f $(EXEC)
PHONY: clean
-------- eof ---------
When I run make it only creates the exception.o form "Makefile.jme", but never
any of the other files.
Can any one hel?
--
You experience miracles everyday, the first one today happened when you first
opened your eyes!
--- Jorge Escalante
__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp