Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile b/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
index 188feb701..e43f49768 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
+++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
@@ -1,12 +1,12 @@
CONF=Debug
-
+TCF_AGENT_DIR=../../agent
CC=gcc
ifeq ($(CONF),Debug)
CFLAGS=-g
else
CFLAGS=-O
endif
-CFLAGS:=$(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -Wmissing-prototypes -I. -I../../agent -I-
+CFLAGS:=$(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -Wmissing-prototypes -I. -I$(TCF_AGENT_DIR) -I-
OPSYS=$(shell uname -o)
MACHINE=$(shell uname -m)
@@ -23,9 +23,9 @@ endif
BINDIR=$(OPSYS)/$(MACHINE)/$(CONF)
-CFILES=$(basename $(wildcard *.c)) $(basename $(notdir $(wildcard ../../agent/*.c)))
+CFILES=$(basename $(wildcard *.c)) $(basename $(notdir $(wildcard $(TCF_AGENT_DIR)/*.c)))
OFILES=$(addprefix $(BINDIR)/,$(filter-out main%.o, $(addsuffix .o, $(CFILES))))
-HFILES=$(wildcard *.h) $(wildcard ../../agent/*.h) Makefile
+HFILES=$(wildcard *.h) $(wildcard $(TCF_AGENT_DIR)/*.h) Makefile
EXECS=$(BINDIR)/agent
@@ -37,11 +37,11 @@ $(BINDIR)/libtcf.a : $(OFILES)
$(BINDIR)/agent: $(BINDIR)/main.o $(BINDIR)/libtcf.a
$(CC) $(CFLAGS) -o $@ $(BINDIR)/main.o $(BINDIR)/libtcf.a $(LIBS)
-$(BINDIR)/%.o: %.c $(HFILES) $(BINDIR)
+$(BINDIR)/%.o: %.c $(HFILES) $(HFILES)
@mkdir -p $(BINDIR)
$(CC) $(CFLAGS) -c -o $@ $<
-$(BINDIR)/%.o: ../../agent/%.c $(HFILES)
+$(BINDIR)/%.o: $(TCF_AGENT_DIR)/%.c $(HFILES)
@mkdir -p $(BINDIR)
$(CC) $(CFLAGS) -c -o $@ $<

Back to the top