Makefile
changeset 3 820ed7fb9314
parent 2 97beb75e5ac7
child 8 96d16dfe787a
equal deleted inserted replaced
2:97beb75e5ac7 3:820ed7fb9314
    31 	md5 \
    31 	md5 \
    32 	varargs \
    32 	varargs \
    33 	concatenation \
    33 	concatenation \
    34 	alpha_beta \
    34 	alpha_beta \
    35 	life \
    35 	life \
    36 	bad_alloc
    36 	bad_alloc \
       
    37 	lotto \
       
    38 	database \
       
    39 	gauss \
       
    40 	mem2swap \
       
    41 	prog_limit
    37 
    42 
    38 .SUFFIXES: .c .cc .asm
    43 .SUFFIXES: .c .cc .asm
    39 
    44 
    40 .c.o:
    45 .c.o:
    41 	@echo Compiling $< ...
    46 	@echo Compiling $< ...
   181 
   186 
   182 bad_alloc: bad_alloc.o
   187 bad_alloc: bad_alloc.o
   183 	@echo Linking $< ...
   188 	@echo Linking $< ...
   184 	@$(CPP) -o $@ $<
   189 	@$(CPP) -o $@ $<
   185 
   190 
       
   191 lotto: lotto.o
       
   192 	@echo Linking $< ...
       
   193 	@$(CPP) -o $@ $<
       
   194 
       
   195 mem2swap: mem2swap.o set_limit.o
       
   196 	@echo Linking $< ...
       
   197 	@$(CPP) -o $@ mem2swap.o set_limit.o
       
   198 
       
   199 prog_limit: prog_limit.o set_limit.o
       
   200 	@echo Linking $< ...
       
   201 	@$(CPP) -o $@ prog_limit.o set_limit.o
       
   202 
       
   203 database: database.c
       
   204 	$(CC) -c -I$(shell pg_config --includedir) $<
       
   205 	@echo Linking $< ...
       
   206 	$(CC) -lpq -o $@ $@.o
       
   207 
       
   208 gauss: gauss.o
       
   209 	@echo Linking $< ...
       
   210 	@$(CPP) -o $@ $<
       
   211 
   186 .PHONY: clean uninstall
   212 .PHONY: clean uninstall
   187 
   213 
   188 clean:
   214 clean:
   189 	rm -f *.o *~
   215 	rm -f *.o *~
   190 	rm -f $(TARGET)
   216 	rm -f $(TARGET)