-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (19 loc) · 708 Bytes
/
Makefile
File metadata and controls
28 lines (19 loc) · 708 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
# Copyright (c) 2015-2017 Advanced Micro Devices, Inc. All rights reserved.
#
# This file is made available under a 3-clause BSD license.
# See lib/LICENSE for licensing details.
include ../make/master.mk
LIB_DIR_CSOURCES=$(shell find ${LIB_DIR} -name "*.c" -type f)
LIB_DIR_COBJECTS=$(LIB_DIR_CSOURCES:.c=.o)
LIB_DIR_CDEPS=$(LIB_DIR_COBJECTS:.o=.d)
BUILD_THESE=$(LIB_DIR)
CFLAGS += -fPIC
TARGET = libibs
VERSION = 1
all: $(TARGET).so.$(VERSION)
$(TARGET).so.$(VERSION): $(LIB_DIR_COBJECTS)
$(CC) -shared $(CFLAGS) -o $@ $^
ln -f -s $(TARGET).so.$(VERSION) $(LIB_DIR)/$(TARGET).so
clean:
rm -f $(TARGET).so.$(VERSION) $(TARGET).so $(LIB_DIR_COBJECTS) $(LIB_DIR_CDEPS)
-include $(LIB_DIR_CDEPS)