summaryrefslogtreecommitdiff
path: root/build/NWGNUmakefile
blob: baf03d2fe930e5256af942f28d9160697e4183f2 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
# Declare the sub-directories to be built here
#

SUBDIRS = \
	$(EOLIST) 

#
# Get the 'head' of the build environment.  This includes default targets and
# paths to tools
#

include $(APR_WORK)\build\NWGNUhead.inc

#
# build this level's files

FILES_prebuild_headers = \
	$(APR)/include/apr.h \
	$(APRUTIL)/include/apu.h \
	$(APRUTIL)/include/apu_want.h \
	$(APRUTIL)/include/apr_ldap.h \
	$(APRUTIL)/include/private/apu_config.h \
	$(APRUTIL)/include/private/apu_select_dbm.h \
	$(APRUTIL)/xml/expat/lib/expat.h \
	$(APRUTIL)/xml/expat/lib/config.h \
	$(EOLIST) 
    
nlms :: $(APR)/aprlib.imp

$(APR)/aprlib.imp : make_nw_export.awk nw_export.i
	@echo Generating $(subst /,\,$@)
	$(AWK) -v EXPPREFIX=APR$(VERSION_MAJMIN) -f $^ | sort >$@
    
nw_export.i : nw_export.inc $(APRUTIL)/build/nw_apu_export.inc $(FILES_prebuild_headers) $(NLM_NAME)_cc.opt
	@echo Generating $(subst /,\,$@)
	$(CC) $< @$(NLM_NAME)_cc.opt

$(NLM_NAME)_cc.opt : NWGNUmakefile $(APR_WORK)\build\NWGNUenvironment.inc $(APR_WORK)\build\NWGNUhead.inc $(APR_WORK)\build\NWGNUtail.inc $(CUSTOM_INI)
	$(CHK) $@ $(DEL) $@
	@echo -P >> $@
	@echo -EP >> $@
	@echo -nosyspath >> $@
	@echo -w nocmdline >> $@
	@echo $(DEFINES) -DGENEXPORTS >> $@
	@echo -I$(APR)\include >> $@
	@echo -I$(APR)\include\arch\netware >> $@
	@echo -I$(APR)\include\arch\unix >> $@
	@echo -I$(APRUTIL)\include >> $@
	@echo -I$(APRUTIL)\build >> $@
	@echo -ir $(NOVELLLIBC) >> $@
ifneq "$(LDAPSDK)" ""
	@echo -ir $(LDAPSDK) >> $@
endif

$(APR)/include/%.h: $(subst /,\,$(APR))\include\%.hnw
	@echo Creating $(subst /,\,$@)
	$(CP) $< $(subst /,\,$(APR))\include\$(@F)

$(APRUTIL)/include/private/%.h: $(subst /,\,$(APRUTIL))\include\private\%.hnw
	@echo Creating $(subst /,\,$@)
	$(CP) $< $(subst /,\,$(APRUTIL))\include\private\$(@F)

$(APRUTIL)/include/private/%.h: $(subst /,\,$(APRUTIL))\include\private\%.hw
	@echo Creating $(subst /,\,$@)
	$(CP) $< $(subst /,\,$(APRUTIL))\include\private\$(@F)

$(APRUTIL)/include/%.h: $(subst /,\,$(APRUTIL))\include\%.hnw
	@echo Creating $(subst /,\,$@)
	$(CP) $< $(subst /,\,$(APRUTIL))\include\$(@F)

$(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.hnw
	@echo Creating $(subst /,\,$@)
	$(CP) $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F)

$(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.h.in
	@echo Creating $(subst /,\,$@)
	$(CP) $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F)

#
# You can use this target if all that is needed is to copy files to the
# installation area
#
install :: nlms FORCE
	

clean ::
	$(CHK) nw_export.i                                              $(DEL) nw_export.i
	$(CHK) $(NLM_NAME)_cc.opt                                       $(DEL) $(NLM_NAME)_cc.opt
	$(CHK) NWGNUversion.inc                                         $(DEL) NWGNUversion.inc	
	$(CHK) $(subst /,\,$(APR))\include\apr.h                        $(DEL) $(subst /,\,$(APR))\include\apr.h
	$(CHK) $(subst /,\,$(APRUTIL))\include\apu.h                    $(DEL) $(subst /,\,$(APRUTIL))\include\apu.h
	$(CHK) $(subst /,\,$(APRUTIL))\include\apu_want.h               $(DEL) $(subst /,\,$(APRUTIL))\include\apu_want.h
	$(CHK) $(subst /,\,$(APRUTIL))\include\apr_ldap.h               $(DEL) $(subst /,\,$(APRUTIL))\include\apr_ldap.h
	$(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_config.h     $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_config.h
	$(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h
	$(CHK) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h            $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h
	$(CHK) $(subst /,\,$(APRUTIL))\xml\expat\lib\config.h           $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\config.h
	$(CHK) $(subst /,\,$(APR))\aprlib.imp                           $(DEL) $(subst /,\,$(APR))\aprlib.imp

#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#

include $(APR_WORK)\build\NWGNUtail.inc