summaryrefslogtreecommitdiff
path: root/Makefile
blob: 10e7c667d19a041936ecf79706829456f8a5f44d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CC=tcc
SRC=src
OBJ=obj
SOURCES=$(wildcard $(SRC)/*.c)
OBJECTS=$(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(SOURCES))
BIN=main


$(BIN): $(OBJECTS)
	$(CC) $(OBJECTS) -o $(BIN)

$(OBJ)/%.o: $(SRC)/%.c
	$(CC) -c $< -o $@

clean:
	rm -r $(BIN) $(OBJ)/*.o