Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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