Makefile

changeset 74
831928419249
parent 72
b533da8e7411
equal deleted inserted replaced
73:072fa3e165f0 74:831928419249
26 # POSSIBILITY OF SUCH DAMAGE. 26 # POSSIBILITY OF SUCH DAMAGE.
27 # 27 #
28 28
29 include config.mk 29 include config.mk
30 30
31 SRC = frontend.c
32 SRC += c2html.c
33 SRC += highlighter.c
34
35 OBJ = $(SRC:%.c=build/%.o)
36
37 all: build build/c2html 31 all: build build/c2html
38 32
39 build/c2html: $(OBJ) 33 build/c2html: build/frontend.o build/highlighter.o build/c2html.o
40 $(CC) -o $@ $^ $(LDFLAGS) 34 $(CC) -o $@ $(LDFLAGS) $^
41 35
42 build/%.o: src/%.c 36 build/c2html.o: src/c2html.c src/c2html.h src/highlighter.h
37 $(CC) -o $@ $(CFLAGS) -c $<
38
39 build/frontend.o: src/frontend.c src/c2html.h src/highlighter.h
40 $(CC) -o $@ $(CFLAGS) -c $<
41
42 build/highlighter.o: src/highlighter.c src/highlighter.h
43 $(CC) -o $@ $(CFLAGS) -c $< 43 $(CC) -o $@ $(CFLAGS) -c $<
44 44
45 build: 45 build:
46 $(MKDIR) $@ 46 $(MKDIR) $@
47 47
48 check: all 48 check: all
49 cd test && $(MAKE) 49 cd test && $(MAKE) -s
50 50
51 clean: 51 clean:
52 $(RMDIR) build 52 $(RMDIR) build

mercurial