# Makefile for compiling the examples. # Type "make smiley" for a demonstration. # Type "make dynamic" to see if dynamic linking is working. # Type "make alldemo", "make fields" etc for other examples. CC = gcc -g APP_PATH = /home/loki/apps/app/src APP_LIB = app X11 = /usr/X11R6 X11LIB = $(X11)/lib LIBS = -lX11 -lc -lm DYNALINK = -Xlinker -rpath -Xlinker $(APP_PATH) CFLAGS = -I$(APP_PATH) DYNAMIC = -L$(APP_PATH) -l$(APP_LIB) -L$(X11LIB) $(LIBS) $(DYNALINK) STATIC = $(APP_PATH)/lib$(APP_LIB).a -L$(X11LIB) $(LIBS) TARGETS = alldemo arcs blend char clock editdraw ellipses fastline fields imagedit imagine imgtest listtest pizza polygons rainbow scribble scrolls smiley spectrum tester utf8edit viewutf8 wintypes static: smiley.o # Creating the static version. # Try "make dynamic" for a smaller executable size. $(CC) $(CFLAGS) smiley.o $(STATIC) -o smiley dynamic: smiley.o # Creating the dynamic version. # Try "make static" if this has problems. $(CC) $(CFLAGS) smiley.o $(DYNAMIC) -o smiley all: $(TARGETS) ./RunAll.bat alldemo: alldemo.o icons.h $(CC) $(CFLAGS) alldemo.o $(STATIC) -o alldemo arcs: arcs.o $(CC) $(CFLAGS) arcs.o $(STATIC) -o arcs blend: blend.o $(CC) $(CFLAGS) blend.o $(STATIC) -o blend char: char.o $(CC) $(CFLAGS) char.o $(STATIC) -o char clock: clock.o $(CC) $(CFLAGS) clock.o $(STATIC) -o clock editdraw: editdraw.o $(CC) $(CFLAGS) editdraw.o $(STATIC) -o editdraw ellipses: ellipses.o $(CC) $(CFLAGS) ellipses.o $(STATIC) -o ellipses fastline: fastline.o $(CC) $(CFLAGS) fastline.o $(STATIC) -o fastline fields: fields.o $(CC) $(CFLAGS) fields.o $(STATIC) -o fields imagedit: imagedit.o $(CC) $(CFLAGS) imagedit.o $(STATIC) -o imagedit imagine: imagine.o $(CC) $(CFLAGS) imagine.o $(STATIC) -o imagine imgtest: imgtest.o $(CC) $(CFLAGS) imgtest.o $(STATIC) -o imgtest listtest: listtest.o $(CC) $(CFLAGS) listtest.o $(STATIC) -o listtest pizza: pizza.o $(CC) $(CFLAGS) pizza.o $(STATIC) -o pizza polygons: polygons.o $(CC) $(CFLAGS) polygons.o $(STATIC) -o polygons rainbow: rainbow.o $(CC) $(CFLAGS) rainbow.o $(STATIC) -o rainbow scribble: scribble.o $(CC) $(CFLAGS) scribble.o $(STATIC) -o scribble scrolls: scrolls.o $(CC) $(CFLAGS) scrolls.o $(STATIC) -o scrolls smiley: smiley.o $(CC) $(CFLAGS) smiley.o $(STATIC) -o smiley spectrum: spectrum.o $(CC) $(CFLAGS) spectrum.o $(STATIC) -o spectrum tester: tester.o $(CC) $(CFLAGS) tester.o $(STATIC) -o tester utf8edit: utf8edit.o $(CC) $(CFLAGS) utf8edit.o $(STATIC) -o utf8edit viewutf8: viewutf8.o $(CC) $(CFLAGS) viewutf8.o $(STATIC) -o viewutf8 wintypes: wintypes.o $(CC) $(CFLAGS) wintypes.o $(STATIC) -o wintypes clean: rm -f core *.o $(TARGETS)