8 CFLAGS=-Wall -pedantic -std=c99 -O2 -g -DASSERT_CORE -DHAVE_HSTRERROR
10 CFLAGS+= -DHAVE_POLL_H
14 CFLAGS+= -DHAVE_SYS_POLL_H -D_GNU_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
26 INCLUDE=-I$(topbuilddir)/include -I. $(EXTRAINCLUDE)
35 SUBDIROBJS := $(SUBDIRS:%=%/SUBSYS.o)
41 $(CC) $(CFLAGS) $(INCLUDE) -c $<
43 all: $(SUBSYS) $(LIBRARY) $(PROGRAM)
46 $(1): $$(PROGRAMOBJ_$(1))
49 $(foreach prog,$(PROGRAM),$(eval $(call prog_dep,$(prog))))
53 $(PROGRAM): $(LIBRARY)
57 $(CC) -o $@ $< $(PROGRAMOBJ_$(@)) $(LIBRARY) $(LIB)
61 $(LIBRARY): $(LIBOBJ) $(SUBDIROBJS)
62 $(AR) $(ARFLAGS) $@ $(LIBOBJ) $(SUBDIROBJS)
68 $(LD) $(LDFLAGS) -o $@ $(SUBOBJ)
72 $(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
74 $(SUBDIRS:%=%-recursive):
75 $(MAKE) -C $(subst -recursive,,$@) -f Makefile OS=$(OS) SUBSYS.o
84 rm -rf $(foreach P, $(PROGRAM), $P.o $(PROGRAMOBJ_$(P)))
91 rm -rf $(SUBOBJ) $(SUBSYS)
94 for dir in $(SUBDIRS); do $(MAKE) -f Makefile -C $$dir OS=$(OS) clean || exit; done