File: makefile_nearby.txt

package info (click to toggle)
libjodycode 4.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,664 kB
  • sloc: ansic: 2,810; makefile: 368; sh: 153; xml: 18
file content (38 lines) | stat: -rw-r--r-- 1,350 bytes parent folder | download | duplicates (3)
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
For easy integration of libjodycode into your build process you can use this
code stub to link against a built copy in ../libjodycode; Modify as necessary.

COMPILER_OPTIONS should be added to CFLAGS for each object.
LINK_OPTIONS should be added to LDFLAGS for the final link.

Add the static_jc and dynamic_jc rules to be able to build with libjodycode
as a static inclusion or to link to it dynamically.

Add the libjodycode_hint rule and add it to 'all' to tell the user about the
static libjodycode make option.


### Find and use nearby libjodycode by default
ifndef IGNORE_NEARBY_JC
 ifneq ("$(wildcard ../libjodycode/libjodycode.h)","")
  $(info Found and using nearby libjodycode at ../libjodycode)
  COMPILER_OPTIONS += -I../libjodycode -L../libjodycode
  ifeq ("$(wildcard ../libjodycode/version.o)","")
   $(error You must build libjodycode before building winregfs)
  endif
 endif
 ifdef FORCE_JC_DLL
  LINK_OPTIONS += -l:../libjodycode/libjodycode.dll
 else
  LINK_OPTIONS += -ljodycode
 endif
endif


dynamic_jc: $(PROGRAM_NAME)
	$(CC) $(CFLAGS) $(OBJS) -Wl,-Bdynamic $(LDFLAGS) -o $(PROGRAM_NAME)$(SUFFIX)

static_jc: $(PROGRAM_NAME)
	$(CC) $(CFLAGS) $(OBJS) -Wl,-Bstatic $(LDFLAGS) -Wl,-Bdynamic -o $(PROGRAM_NAME)$(SUFFIX)

libjodycode_hint:
	$(info hint: if ../libjodycode is built but jdupes won't run, try doing 'make static_jc')