File: Makefile

package info (click to toggle)
yaws 1.65-4etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,164 kB
  • ctags: 3,907
  • sloc: erlang: 20,138; sh: 3,675; makefile: 556; ansic: 404; lisp: 79
file content (52 lines) | stat: -rw-r--r-- 1,352 bytes parent folder | download | duplicates (2)
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
include ../include.mk
include ../vsn.mk

# don't c-compile anything on win32 (yet)
# I don't know how to make a linked in driver using gcc, or any
# other compiler there, and have no intentions of finding out

ifdef WIN32
	PRIV_FILES=../priv/.foo
else
# don't make pam if configured out with --disable-pam
	PRIV_FILES= ../priv/setuid_drv.$(DLL)  $(EPAM)
endif


CFLAGS += -I"${ERLDIR}/usr/include"

# and for MacOs + possibly others ...
CFLAGS += -I/usr/include/pam/ $(EXTRAINCLUDE)

#
# Targets
#

all: $(PRIV_FILES) 

clean:
	-rm -f $(PRIV_FILES) setuid_drv.$(OBJ) emap.$(OBJ)

install:	$(PRIV_FILES)
	$(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/erlang/lib/yaws-$(YAWS_VSN)/priv
	$(INSTALL) $(PRIV_FILES) $(DESTDIR)$(PREFIX)/lib/erlang/lib/yaws-$(YAWS_VSN)/priv
ifndef WIN32
	if [ `id -u` = "0" -a -d $(DESTDIR)$(PREFIX)/lib/erlang/lib/yaws-$(YAWS_VSN)/priv/epam ]; then \
		chown root $(DESTDIR)$(PREFIX)/lib/erlang/lib/yaws-$(YAWS_VSN)/priv/epam; \
		chmod a+s $(DESTDIR)$(PREFIX)/lib/erlang/lib/yaws-$(YAWS_VSN)/priv/epam; \
	fi
endif


../priv/setuid_drv.$(DLL): setuid_drv.$(OBJ)
	$(LD_SHARED) $(OUT) $@  setuid_drv.$(OBJ) $(DLL_LIBS)
setuid_drv.$(OBJ):	setuid_drv.c
	$(CC) -c $(FPIC) $(CFLAGS) -DDYNAMIC_DRIVER setuid_drv.c

../priv/.foo:
	touch ../priv/.foo	

epam.o:	epam.c
	$(CC) -c $(CFLAGS) epam.c
../priv/epam: epam.o
	$(CC) -o $@ epam.o -lpam