garten

diff Makefile @ 12:8db6497d6065

merged everything to only one program
author meillo@marmaro.de
date Wed, 23 Jul 2008 15:19:45 +0200
parents 13c6828bd4a5
children bbc214c6fa6f
line diff
     1.1 --- a/Makefile	Wed Jul 23 11:41:38 2008 +0200
     1.2 +++ b/Makefile	Wed Jul 23 15:19:45 2008 +0200
     1.3 @@ -22,6 +22,8 @@
     1.4  
     1.5  # files
     1.6  DEP = db.h game.h
     1.7 +SRC = main.c clock.c environment.c weather.c growth.c db.c
     1.8 +OBJ = $(SRC:.c=.o)
     1.9  
    1.10  
    1.11  .PHONY: all
    1.12 @@ -40,20 +42,11 @@
    1.13  .PHONY: build
    1.14  build: options ${NAME}
    1.15  
    1.16 -bin/clock: clock.c $(DEP)
    1.17 -	$(CC) -o $@ $(LDFLAGS) clock.c
    1.18  
    1.19 -bin/weather: weather.c $(DEP)
    1.20 -	$(CC) -o $@ $(LDFLAGS) weather.c
    1.21 +$(OBJ): $(SRC) $(DEP)
    1.22  
    1.23 -bin/environment: environment.c $(DEP)
    1.24 -	$(CC) -o $@ $(LDFLAGS) environment.c
    1.25 -
    1.26 -bin/growth: growth.c $(DEP)
    1.27 -	$(CC) -o $@ $(LDFLAGS) growth.c
    1.28 -
    1.29 -
    1.30 -${NAME}: bin/clock bin/weather bin/environment bin/growth
    1.31 +${NAME}: $(DEP) $(OBJ)
    1.32 +	gcc -o $(NAME) $(LDFLAGS) $(OBJ)
    1.33  
    1.34  
    1.35  .PHONY: car
    1.36 @@ -63,7 +56,7 @@
    1.37  .PHONY: strip
    1.38  strip: ${NAME}
    1.39  	@echo stripping
    1.40 -	@strip bin/*
    1.41 +	@strip *
    1.42  
    1.43  
    1.44  .PHONY: changelog
    1.45 @@ -75,7 +68,7 @@
    1.46  .PHONY: clean
    1.47  clean:
    1.48  	rm -f *.o
    1.49 -	rm -f bin/*
    1.50 +	rm -f *
    1.51  
    1.52  
    1.53  #dist: build changelog