summaryrefslogtreecommitdiff
path: root/examples/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
index 0000000..234618f
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,36 @@
+.SUFFIXES: .c .o
+
+ CC = gcc -g
+TARGETS = motifButtonIvy gtkIvyButton testUnbind
+ SRCS = motifButtonIvy.c gtkIvyButton.c testUnbind.c
+ OBJS = $(SRCS:.c=.o)
+PCRELIB = `pcre-config --libs`
+EXTRALIB= -L../src
+GTKLIB = `pkg-config gtk+-x11-2.0 --libs`
+GTKINC = `pkg-config gtk+-x11-2.0 --cflags`
+MOTIFINC=
+MOTIFLIB= -L/usr/X11R6/lib -lXm -lXt -lX11
+#MOTIFINC= -I/sw/include
+#MOTIFLIB= -L/sw/lib -L/usr/X11R6/lib -lXm -lXt -lX11
+
+
+all: $(TARGETS)
+
+testUnbind: testUnbind.o
+ $(CC) -o $@ $< -livy $(PCRELIB) $(EXTRALIB)
+
+gtkIvyButton.o: gtkIvyButton.c
+ $(CC) -c $< $(GTKINC)
+
+gtkIvyButton: gtkIvyButton.o
+ $(CC) -o $@ $< $(GTKLIB) -lgivy $(EXTRALIB)
+
+motifButtonIvy.o: motifButtonIvy.c
+ $(CC) -c $< $(MOTIFINC) $(EXTRALIB)
+
+motifButtonIvy: motifButtonIvy.o
+ $(CC) -o $@ $< $(MOTIFLIB) -lxtivy -lpcre $(EXTRALIB)
+
+
+clean:
+ rm -fR $(OBJS) $(TARGETS)