-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmakefile
More file actions
31 lines (24 loc) · 718 Bytes
/
makefile
File metadata and controls
31 lines (24 loc) · 718 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
# Dead-simple makefile for Linux building
CC = gcc
CFLAGS = -I. -O2 -Wall -Wextra
# The MS Windows SDK doesn't have getopt, but Linux/Unix does, so we're not including it on Linux
#DEPS = convfont.h getopt.h parse_fnt.h serialize_font.h
DEPS = convfont.h parse_fnt.h parse_text.h serialize_font.h
#OBJ = convfont.o getopt.o parse_fnt.o serialize_font.o
OBJ = convfont.o parse_fnt.o parse_text.o serialize_font.o
ifeq ($(OS),Windows_NT)
RM = del /f $1 2>nul
EXECUTABLE = convfont.exe
SHELL = cmd.exe
else
EXECUTABLE = convfont
RM = rm -rf $1
endif
all: $(EXECUTABLE)
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
$(EXECUTABLE): $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
.PHONY: clean
clean:
$(call RM,*.o $(EXECUTABLE))