-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile.in
85 lines (63 loc) · 2.22 KB
/
Makefile.in
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# Makefile.in -- one file to make them all
#
# Copyright (c) 2022-2024, NLnet Labs. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
WESTMERE = @HAVE_WESTMERE@
HASWELL = @HAVE_HASWELL@
CC = @CC@
CPPFLAGS = @CPPFLAGS@ -I$(SOURCE)/include -I$(SOURCE)/src -I.
CFLAGS = @CFLAGS@
DEPFLAGS = @DEPFLAGS@
VPATH = @srcdir@
SOURCE = @srcdir@
SOURCES = src/zone.c src/fallback/parser.c
OBJECTS = $(SOURCES:.c=.o)
WESTMERE_SOURCES = src/westmere/parser.c
WESTMERE_OBJECTS = $(WESTMERE_SOURCES:.c=.o)
HASWELL_SOURCES = src/haswell/parser.c
HASWELL_OBJECTS = $(HASWELL_SOURCES:.c=.o)
NO_OBJECTS =
DEPENDS = $(SOURCES:.c=.d) $(WESTMERE_SOURCES:.c=.d) $(HASWELL_SOURCES:.c=.d)
# The export header automatically defines visibility macros. These macros are
# required for standalone builds on Windows. I.e., exported functions must be
# declared with __declspec(dllexport) for dynamic link libraries (.dll) and
# __declspec(dllimport) for statically linked libraries (.lib). Define dummy
# macros for compatibility.
EXPORT_HEADER = include/zone/export.h
.PHONY: all clean
all: libzone.a
clean:
@rm -f .depend
@rm -f libzone.a $(OBJECTS) $(EXPORT_HEADER)
@rm -f $($(WESTMERE)_OBJECTS) $($(HASWELL)_OBJECTS)
distclean: clean
@rm -f Makefile config.h config.log config.status
realclean: distclean
@rm -rf autom4te*
maintainer-clean: realclean
devclean: realclean
@rm -rf config.h.in configure
libzone.a: $(OBJECTS) $($(WESTMERE)_OBJECTS) $($(HASWELL)_OBJECTS)
$(AR) rcs libzone.a $(OBJECTS) $($(WESTMERE)_OBJECTS) $($(HASWELL)_OBJECTS)
$(EXPORT_HEADER):
@mkdir -p include/zone
@echo "#define ZONE_EXPORT" > $(EXPORT_HEADER)
$(WESTMERE_OBJECTS): $(EXPORT_HEADER) .depend
@mkdir -p src/westmere
$(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) -march=westmere -o $@ -c $(SOURCE)/$(@:.o=.c)
$(HASWELL_OBJECTS): $(EXPORT_HEADER) .depend
@mkdir -p src/haswell
$(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) -march=haswell -o $@ -c $(SOURCE)/$(@:.o=.c)
$(OBJECTS): $(EXPORT_HEADER) .depend
@mkdir -p src/fallback
$(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) -o $@ -c $(SOURCE)/$(@:.o=.c)
@touch $@
.depend:
@cat /dev/null > $@
@for x in $(DEPENDS:.d=); do echo "$${x}.o: $(SOURCE)/$${x}.c $${x}.d" >> $@; done
-include .depend
$(DEPENDS):
-include $(DEPENDS)