home *** CD-ROM | disk | FTP | other *** search
- #
- # implicitrules.make
- #
- # Implicit rules for generating and compiling source code.
- #
- # IMPORTED VARIABLES
- # All of the commands exported by commands-*.make
- # All of the flags exported by flags.make
- #
-
- #
- # eliminate all the default suffixes
- #
-
- .SUFFIXES:
-
- #
- # compiling
- #
-
- .SUFFIXES: .o .h .c .m .cc .cxx .C .mm .mxx .M .s
-
- .c.o:
- $(CC) $(ALL_CFLAGS) -c -o $(OFILE_DIR)/$*.o $<
-
- .m.o:
- $(CC) $(ALL_MFLAGS) -c -o $(OFILE_DIR)/$*.o $<
-
- .cc.o .C.o .cxx.o:
- $(CC) $(ALL_CCFLAGS) -c -o $(OFILE_DIR)/$*.o $<
-
- .mm.o .M.o .mxx.o:
- ifneq "YES" "$(DISABLE_OBJCPLUSPLUS)"
- $(CC) $(ALL_MMFLAGS) -c -o $(OFILE_DIR)/$*.o $<
- else
- $(SILENT) $(ECHO) Sorry, Objective-C++ compilation of $*.M not supported.
- $(TOUCH) $(SFILE_DIR)/$*.m
- $(CC) -c $(SFILE_DIR)/$*.m -o $(OFILE_DIR)/$*.o
- $(RM) -f $(SFILE_DIR)/$*.m
- endif
-
- .s.o:
- $(CC) $(ALL_CFLAGS) -c -o $(OFILE_DIR)/$*.o $<
-
- #
- # pswraps
- #
-
- .SUFFIXES: .psw .pswm .h .c .m
-
- .psw.h:
- $(PSWRAP) $(ALL_PSWFLAGS) -a -h $(SFILE_DIR)/$*.h -o $(SFILE_DIR)/$*.c $<
- .psw.c:
- $(PSWRAP) $(ALL_PSWFLAGS) -a -h $(SFILE_DIR)/$*.h -o $(SFILE_DIR)/$*.c $<
- .pswm.h:
- $(PSWRAP) $(ALL_PSWFLAGS) -a -h $(SFILE_DIR)/$*.h -o $(SFILE_DIR)/$*.m $<
- .pswm.m:
- $(PSWRAP) $(ALL_PSWFLAGS) -a -h $(SFILE_DIR)/$*.h -o $(SFILE_DIR)/$*.m $<
-
- #
- # Yacc and Lex
- #
-
- .SUFFIXES: .y .l .h .c
-
- .y.c .y.h:
- $(CD) $(SFILE_DIR) && $(YACC) $(ALL_YFLAGS) $(shell pwd)/$<
- $(MV) $(SFILE_DIR)/y.tab.h $(SFILE_DIR)/$*.h
- $(MV) $(SFILE_DIR)/y.tab.c $(SFILE_DIR)/$*.c
-
- .l.c:
- $(CD) $(SFILE_DIR) && $(LEX) $(ALL_LFLAGS) $(shell pwd)/$<
- $(MV) $(SFILE_DIR)/lex.yy.c $(SFILE_DIR)/$*.c
-
- #
- # Precompiled headers
- #
-
- .SUFFIXES: .h .p
-
- .h.p:
- -$(CC) $(ALL_PRECOMPFLAGS) $*.h -o $*.p
- $(SILENT) if [ -n "$(findstring $@, $(PUBLIC_HEADERS))" ] ; then \
- cmd="cd $(PUBLIC_HDR_DIR)$(PUBLIC_HEADER_DIR_SUFFIX) && $(CC) $(ALL_PRECOMPFLAGS) $*.h -o $*.p" ; $(ECHO) $$cmd ; eval $$cmd ; \
- fi
- $(SILENT) if [ -n "$(findstring $@, $(PRIVATE_HEADERS))" ] ; then \
- cmd="cd $(PRIVATE_HDR_DIR)$(PRIVATE_HEADER_DIR_SUFFIX) && $(CC) $(ALL_PRECOMPFLAGS) $*.h -o $*.p" ; $(ECHO) $$cmd ; eval $$cmd ; \
- fi
- $(SILENT) if [ -n "$(findstring $@, $(PROJECT_HEADERS))" ] ; then \
- cmd="cd $(PROJECT_HDR_DIR)$(PROJECT_HEADER_DIR_SUFFIX) && $(CC) $(ALL_PRECOMPFLAGS) $*.h -o $*.p" ; $(ECHO) $$cmd ; eval $$cmd ; \
- fi
- # Note that because precomps must go in the same directory as the .h
- # we may not be able to write the precomp in the local case, so use a '-'
-
- #
- # mig, msgwrap, and rpcgen
- #
-
- ifneq "" "$(MIG)"
- %.h %Server.c %User.c: %.defs
- $(CD) $(SFILE_DIR) && $(MIG) $(ALL_MIGFLAGS) $(shell pwd)/$<
- %.h %Server.c %User.c: %.mig
- $(CD) $(SFILE_DIR) && $(MIG) $(ALL_MIGFLAGS) $(shell pwd)/$<
- else
- %.h: %.h.mig
- $(CP) $< $(SFILE_DIR)/$@
- %User.c: %User.c.mig
- $(CP) $< $(SFILE_DIR)/$@
- %Server.c: %Server.c.mig
- $(CP) $< $(SFILE_DIR)/$@
- endif
-
- %Speaker.h %Speaker.m %Listener.h %Listener.m: %.msg
- $(CD) $(SFILE_DIR) && $(MSGWRAP) $(shell pwd)/$<
-
- %.h: %.x
- $(RPCGEN) $(ALL_RPCFLAGS) -h -o $(SYM_DIR)/$*.h $*.x
- %.c: %.x_svc
- $(RPCGEN) $(ALL_RPCFLAGS) -s udp -s tcp -o $(SYM_DIR)/$*_svc.c $*.x
- %.c: %.x_clnt
- $(RPCGEN) $(ALL_RPCFLAGS) -l -o $(SYM_DIR)/$*_clnt.c $*.x
- %.c: %.x_xdr
- $(RPCGEN) $(ALL_RPCFLAGS) -c -o $(SYM_DIR)/$*_xdr.c $*.x
-