-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 720 Bytes
/
Makefile
File metadata and controls
34 lines (24 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CFLAGS = -O3
CC = gcc
BUNDLE = Makefile tclled.h tclled.c tcltest.c tetris.c hashtable.h hashtable.c
VERSION = 0.5
ARCHIVE = blinky_tetris
all: tcltest hashtable tetris
archive: $(BUNDLE)
mkdir $(ARCHIVE)-$(VERSION)
cp $(BUNDLE) $(ARCHIVE)-$(VERSION)/
tar cvfz $(ARCHIVE)-$(VERSION).tar.gz $(ARCHIVE)-$(VERSION)
rm -rf $(ARCHIVE)-$(VERSION)
clean:
$(RM) *.o
$(RM) $(ARCHIVE)-$(VERSION).tar.gz
tcltest: tcltest.o tclled.o
$(CC) $(CFLAGS) -o tcltest $^
tetris: tetris.o tclled.o hashtable.o
$(CC) $(CFLAGS) -o tetris $^
hashtest: hashtest.o hashtable.o
$(CC) $(CFLAGS) -o $@ $^
tcltest.o: tclled.h tcltest.c
tclled.o: tclled.h tclled.c
tetris.o: tclled.h tetris.c
hashtable.o: hashtable.h hashtable.c