-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_local
26 lines (17 loc) · 879 Bytes
/
Makefile_local
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
BUILD_DIR = ./
EXE = m65script
M65-LIB-INC_PATH = unix/
CC = clang
CFLAGS = -c -Os -g -std=c89
LDFLAGS = -o $(BUILD_DIR)/$(EXE) # "linker flags", yeah
.PHONY: all clean
$(EXE): $(BUILD_DIR)/interpreter.o
$(CC) $(LDFLAGS) $(BUILD_DIR)/interpreter.o $(BUILD_DIR)/m65script_fileio.o $(BUILD_DIR)/m65script_conio.o
interpreter.o: interpreter.c $(BUILD_DIR)/m65script_fileio.o $(BUILD_DIR)/m65script_conio.o
$(CC) $(CFLAGS) -o $(BUILD_DIR)/interpreter.o interpreter.c
$(BUILD_DIR)/m65script_fileio.o: unix/m65script_fileio.c m65script_fileio.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/m65script_fileio.o unix/m65script_fileio.c
$(BUILD_DIR)/m65script_conio.o: unix/m65script_conio.c m65script_conio.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/m65script_conio.o unix/m65script_conio.c
clean:
rm -rfv $(BUILD_DIR)/$(EXE) $(BUILD_DIR)/*.o