Hello,
gcc 4.4.4
I have the following Makefile
OBJECT_FILES = brd.o logger.o test_brd.o
CFLAGS = -m32 -ggdb -Wall -Wextra -D_REENTRANT -D_THREAD_SAFE -O0 -D_DEBUG
# Linker Run-time library path
LDFLAGS = -Wl,-rpath=/usr/NET/lib
FLATFORM = -DLINUX
TARGET = dlg
CC = gcc -m32
LIBS_PATH = -L/usr/NET/lib
INC_PATH = -I/usr/NET/include
LIBS = -lnc -lnxx -lphread
$(TARGET): $(OBJECT_FILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECT_FILES) $(FLATFORM) $(INC_PATH) $(LIBS_PATH) $(LIBS) -o $(TARGET)
test_brd.o: test_brd.c brd.c
$(CC) -c $(CFLAGS) test_brd.c
brd.o: brd.c logger.c
$(CC) -c $(CFLAGS) $(INC_PATH) brd.c
logger.o: logger.c
$(CC) -c $(CFLAGS) $(INC_PATH) logger.c
clean:
rm -f $(TARGET) $(OBJECT_FILES)
However, the logger.c doesn't need to be built anymore. Is there a way to include it in the project without having to compile it each time. When I clean my project. It will re-compile it again, and it is a large file.
Many thanks for any suggestions,