Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-02-25 23:27:10 +0000
committereutarass2008-02-25 23:27:10 +0000
commit94fbe6cda0f6ddb394b08594e49ffa6de7d87d33 (patch)
treea25f9d8b653234d12553a20bd01eec172a6d844f /examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
parent521178c66ba2989ab837a9d7bb1c4a75216cfde2 (diff)
downloadorg.eclipse.tcf-94fbe6cda0f6ddb394b08594e49ffa6de7d87d33.tar.gz
org.eclipse.tcf-94fbe6cda0f6ddb394b08594e49ffa6de7d87d33.tar.xz
org.eclipse.tcf-94fbe6cda0f6ddb394b08594e49ffa6de7d87d33.zip
Added example agent project: examples/org.eclipse.tm.tcf.examples.daytime.agent.
Renamed agent/memory.[hc] to agent/memoryservice.[hc] to avoid conflict with standard header file.
Diffstat (limited to 'examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile')
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile b/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
new file mode 100644
index 000000000..64d3ba729
--- /dev/null
+++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
@@ -0,0 +1,30 @@
+CC=gcc
+CFLAGS=-O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -I. -I../../agent -I-
+
+CFILES=$(basename $(wildcard *.c)) $(basename $(notdir $(wildcard ../../agent/*.c)))
+OFILES=$(filter-out main%.o, $(addsuffix .o, $(CFILES)))
+HFILES=$(wildcard *.h) $(wildcard ../../agent/*.h) Makefile
+
+EXES=agent
+
+UNAME=$(shell uname -o)
+
+ifeq ($(UNAME),Cygwin)
+LIBS=-lpthread -lws2_32
+else
+LIBS=-lpthread -lrt -lelf
+endif
+
+all: $(EXES)
+
+agent: main.o $(OFILES)
+ $(CC) $(CFLAGS) -o $@ main.o $(OFILES) $(LIBS)
+
+%.o: %.c $(HFILES)
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+%.o: ../../agent/%.c $(HFILES)
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+clean:
+ rm -f *.o $(EXES)

Back to the top