forked from AmigaLabs/clib4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libcrypt.gmk
51 lines (40 loc) · 1.42 KB
/
libcrypt.gmk
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
#
# $Id: libcrypt.gmk,v 1.0 2022-07-09 10:09:48 clib4devs Exp $
#
# :ts=8
#
# -*- mode: makefile; -*-
OUT_STATIC := $(BUILD_DIR)/obj/libcrypt
OUT_SHARED := $(BUILD_DIR)/obj.shared/libcrypt
ifeq ($(SHARED),yes)
LIBS += $(OUTPUT_LIB)/libcrypt.so
endif
ifeq ($(STATIC),yes)
LIBS += $(OUTPUT_LIB)/libcrypt.a
endif
C_CRYPT := \
crypt/crypt.o \
crypt/crypt_blowfish.o \
crypt/crypt_des.o \
crypt/crypt_md5.o \
crypt/crypt_r.o \
crypt/crypt_sha256.o \
crypt/crypt_sha512.o
CRYPT_LIB := \
crypt/crypt.lib_rev.o
SOURCES_SHARED = $(addprefix $(OUT_SHARED)/, $(CRYPT_LIB))
SOURCES_STATIC = $(addprefix $(OUT_STATIC)/, $(CRYPT_LIB))
OBJ_C_LIB += $(addprefix $(OUT_SHARED_LIB)/, $(C_CRYPT))
# Dependencies to rebuild if the library version changes
$(OUT_STATIC)/crypt/crypt.lib_rev.o : $(LIB_DIR)/crypt/crypt.lib_rev.c $(LIB_DIR)/crypt/crypt.lib_rev.h
$(OUT_SHARED)/crypt/crypt.lib_rev.o : $(LIB_DIR)/crypt/crypt.lib_rev.c $(LIB_DIR)/crypt/crypt.lib_rev.h
$(OUT_STATIC)/%.o : CFLAGS += -Wno-missing-braces $(LARGEDATA)
$(OUT_SHARED)/%.o : CFLAGS += -Wno-missing-braces $(PIC) $(LARGEDATA)
$(OUT_STATIC)/crypt/crypt.lib_rev.o : $(LIB_DIR)/crypt/crypt.lib_rev.c
$(VERBOSE)$(COMPILE)
$(OUT_SHARED)/crypt/crypt.lib_rev.o : $(LIB_DIR)/crypt/crypt.lib_rev.c
$(VERBOSE)$(COMPILE_SHARED)
$(OUTPUT_LIB)/libcrypt.a : $(SOURCES_STATIC)
$(VERBOSE)$(MAKELIB)
$(OUTPUT_LIB)/libcrypt.so :$(SOURCES_SHARED)
$(VERBOSE)$(MAKESHARED)