File: makefile

package info (click to toggle)
libcleri 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 560 kB
  • sloc: ansic: 4,572; makefile: 51; sh: 40
file content (53 lines) | stat: -rw-r--r-- 923 bytes parent folder | download
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
-include ../makefile.init

RM := rm -rf
CC ?= gcc

-include sources.mk
-include src/subdir.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

-include ../makefile.defs

OS := $(shell uname)
ifeq ($(OS),Darwin)
FN := libcleri.dylib
INSTALL_PATH := /usr/local
SO_NAME := install_name
else
FN := libcleri.so
INSTALL_PATH := /usr
SO_NAME := soname
endif

# All Target
all: libcleri

# Tool invocations
libcleri: $(OBJS) $(USER_OBJS)
	@echo 'Building target: $@'
	@echo "Invoking: Cross $(CC) Linker"
	$(CC) -shared -Wl,-$(SO_NAME),$(FN).$(MAJOR) -o $(FN) $(OBJS) $(USER_OBJS) $(LIBS) $(LDFLAGS)
	@chmod -x $(FN)
	@echo 'Finished building target: $@'
	@echo ' '

# Other Targets
clean:
	-$(RM) $(LIBRARIES)$(OBJS)$(C_DEPS) $(FN)
	-@echo ' '

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets

test:
	@cd ../test && ./test.sh