File: Makefile

package info (click to toggle)
xmhtml 1.1.7-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,104 kB
  • ctags: 8,347
  • sloc: ansic: 68,063; makefile: 496; sh: 161; perl: 36
file content (61 lines) | stat: -rw-r--r-- 1,552 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

# List of sources
SRCS = example_1.c example_2.c example_4.c
MSRCS= visual.c misc.c cache.c menu.c history.c

# List of object files
OBJS = example_1.o example_2.o example_4.o
MOBJS= visual.o misc.o cache.o menu.o history.o

# Targets to make
EXAMPLES=example_1 example_2 example_4

# The XmHTML library
XMHTMLLIB = -L../lib -lXmHTML

# Richard Offer's http client-side library
HTTPLIB   = -L../http -lhttp

# Libraries against which all examples are linked 
LINKLIBS = $(XMHTMLLIB) $(LOADLIBES) $(DMALLOCLIB)

# rule to create .o files from .c files 
.c.o:
	$(RM) $@
	$(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $<

all: $(EXAMPLES)

# targets to build

example_1::  ../src/libXmHTML.a example_1.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) example_1.o $(LINKLIBS)

example_2::  ../src/libXmHTML.a example_2.o $(MOBJS)
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) example_2.o $(MOBJS) $(LINKLIBS)

example_4::  ../src/libXmHTML.a example_4.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) example_4.o $(LINKLIBS) $(HTTPLIB)

.PHONY: ../src/libXmHTML.a 
.PHONY: stamp-includes

includes:: stamp-includes

depend:: $(SRCS) $(MSRCS)
	$(MAKEDEPEND) $(INCLUDES) $(CPPFLAGS) $(SRCS) $(MSRCS)

clean::
	$(RM) $(OBJS) $(MOBJS) 
	$(RM) $(EXAMPLES)

distclean:: clean 
	$(RM) core *.out *.log make.world *.bak *.last *.auto *.rej *.orig
	$(CP) Makefile.org Makefile

#--------------------------------------------------------------------------
# don't delete anything below this line, makedepend depends on it
#--------------------------------------------------------------------------