forked from Siguza/iometa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (20 loc) · 828 Bytes
/
Makefile
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
VERSION = 1.6.6
TARGET = iometa
SRCDIR = src
GENDIR = gen
FLAGS = -Wall -O3 -flto -DVERSION=$(VERSION) -DTIMESTAMP="`date +'%d. %B %Y %H:%M:%S'`" -framework CoreFoundation -framework IOKit -lc++abi -I$(SRCDIR) $(CFLAGS)
.PHONY: all aux clean
all: $(TARGET)
$(TARGET): $(SRCDIR)/*.h $(SRCDIR)/*.c $(GENDIR)/cxxsym.c
$(CC) -o $@ $(FLAGS) $(SRCDIR)/*.c $(GENDIR)/cxxsym.c
$(GENDIR)/cxxsym.c: $(SRCDIR)/cxxsym.y | $(GENDIR)
bison -o $@ $<
$(GENDIR):
mkdir -p $@
aux: mangle pac
mangle: $(SRCDIR)/util.h $(SRCDIR)/cxx.h $(SRCDIR)/util.c $(GENDIR)/cxxsym.c
$(CC) -o $@ $(FLAGS) -DCXXSYM_DEBUG $(SRCDIR)/util.c $(GENDIR)/cxxsym.c
pac: $(SRCDIR)/util.h $(SRCDIR)/cxx.h $(SRCDIR)/util.c $(SRCDIR)/cxx.c
$(CC) -o $@ $(FLAGS) -DCXXPAC_DEBUG $(SRCDIR)/util.c $(SRCDIR)/cxx.c
clean:
rm -rf $(TARGET) $(GENDIR) mangle pac