Commit 4e849b52065a86447e763e31aa05b67a0598fe12

Authored by Grzegorz Jabłoński
1 parent 76123152

Cleaned up makefiles

00-sun/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs`
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file
01-cannon/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file
02-cannon_wide/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file
03-bullet/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file
04-shoot/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file
05-target/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file
06-multiple_targets/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file
07-tapered_bullet/makefile
@@ -5,12 +5,12 @@ all: $(TARGET) @@ -5,12 +5,12 @@ all: $(TARGET)
5 %.o:%.c 5 %.o:%.c
6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@ 6 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` -c $< -o $@
7 7
8 -%: %.c ../primlib.o %.c 8 +$(TARGET): $(TARGET).o ../primlib.o
9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm 9 gcc -g -I.. -Wall -pedantic `sdl2-config --cflags` ../primlib.o $< -o $@ -lSDL2_gfx `sdl2-config --libs` -lm
10 10
11 ../primlib.o: ../primlib.c ../primlib.h 11 ../primlib.o: ../primlib.c ../primlib.h
12 12
13 -$(TARGET): $(TARGET).c ../primlib.h 13 +$(TARGET).o: $(TARGET).c ../primlib.h
14 14
15 clean: 15 clean:
16 - -rm $(TARGET)  
17 \ No newline at end of file 16 \ No newline at end of file
  17 + -rm $(TARGET) $(TARGET).o ../primlib.o
18 \ No newline at end of file 18 \ No newline at end of file