| 
									
										
										
										
											1998-04-22 12:58:34 +00:00
										 |  |  | # Makefile for the BIRD Internet Routing Daemon | 
					
						
							|  |  |  | # (c) 1998 Martin Mares <mj@ucw.cz> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | THISDIR=$(shell pwd) | 
					
						
							|  |  |  | RELDIR=$(subst $(TOPDIR)/,,$(THISDIR)) | 
					
						
							| 
									
										
										
										
											1998-05-15 07:56:13 +00:00
										 |  |  | ONAME=$(subst /,_,$(RELDIR)).o | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ifndef SRCS | 
					
						
							| 
									
										
										
										
											1998-04-28 14:39:34 +00:00
										 |  |  | SRCS=$(subst .o,.c,$(OBJS)) | 
					
						
							| 
									
										
										
										
											1998-05-15 07:56:13 +00:00
										 |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-05-20 11:54:33 +00:00
										 |  |  | .PHONY: all this dep | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | all: | 
					
						
							|  |  |  | 	@echo "Please run the top-level Makefile instead." | 
					
						
							|  |  |  | 	@exit 1 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-05-15 07:56:13 +00:00
										 |  |  | ifdef OBJS | 
					
						
							| 
									
										
										
										
											1998-04-22 12:58:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-05-15 07:56:13 +00:00
										 |  |  | ifdef LIB | 
					
						
							| 
									
										
										
										
											1998-04-22 12:58:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-05-20 11:54:33 +00:00
										 |  |  | this: $(LIB) | 
					
						
							| 
									
										
										
										
											1998-04-28 14:39:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-05-15 07:56:13 +00:00
										 |  |  | $(LIB): $(OBJS) | 
					
						
							|  |  |  | 	rm -f $(LIB) | 
					
						
							|  |  |  | 	ar rcs $(LIB) $(OBJS) | 
					
						
							|  |  |  | 	ranlib $(LIB) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-05-20 11:54:33 +00:00
										 |  |  | this: $(ONAME) | 
					
						
							| 
									
										
										
										
											1998-05-15 07:56:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | $(ONAME): $(OBJS) | 
					
						
							|  |  |  | 	$(LD) -r -o $(ONAME) $(OBJS) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | endif | 
					
						
							| 
									
										
										
										
											1998-04-28 14:39:34 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | dep: $(SRCS) | 
					
						
							|  |  |  | 	rm -f .depend | 
					
						
							|  |  |  | 	for a in $(SRCS) ; do gcc $(CPPFLAGS) -MM $$a >>.depend ; done | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | dep: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ifneq ($(wildcard .depend),) | 
					
						
							|  |  |  | include .depend | 
					
						
							|  |  |  | endif |