source: branches/client-1.5/src/Makefile.kmk@ 150

Last change on this file since 150 was 148, checked in by Yuri Dario, 17 years ago

Client build system packaging rules.

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1#
2# please define (as env variables or kmk command line) the following variables before starting:
3# BUILD_PLATFORM = os2
4# BUILD_TYPE = release|debug
5#
6# Copy Config.km_ to Config.kmk and edit it to match your installation.
7#
8
9DEPTH = ..
10
11TOOL = GCC3OMF
12
13DLLS = ndpsmb
14
15ndpsmb_SOURCES = \
16 rc/rc.rc \
17 ndpsmb.def \
18 ndpsmb.c \
19 debug.c \
20 printf.c \
21 util.c \
22 smbwrp.c
23
24ndpsmb_CFLAGS = -Zomf
25ndpsmb_CFLAGS.release = -s -O3 -march=pentium -mcpu=pentium4
26ndpsmb_CFLAGS.debug = -g -O0 -DDEBUG_PRINTF
27ndpsmb_LDFLAGS = -Zomf -Zno-fork -Zmap -Zbin-files
28ndpsmb_LDFLAGS.release = -s
29ndpsmb_LDFLAGS.debug = -g
30
31ndpsmb_DEFS =
32ndpsmb_INCS = ./h ./rc \
33 $(SAMBA)/source \
34 $(SAMBA)/source/include \
35 $(SAMBA)/source/lib/replace \
36 $(SAMBA)/source/popt \
37 $(SAMBA)/source/lib/talloc \
38 $(SAMBA)/source/librpc \
39 $(SAMBA)/source/tdb/include
40
41ndpsmb_LIBS = libsmbclient.a socket.a
42ndpsmb_LIBPATH = $(SAMBA)/source/bin
43
44ndpsmb_CLEAN = rc/description.rc $(PATH_BIN)/ndpsmb.dll
45
46
47#build other files (e.g. help)
48OTHERS = $(PATH_BIN)/ndpsmb.hlp $(PATH_BIN)/readme.txt
49OTHER_CLEAN = $(PATH_BIN)/ndpsmb.hlp $(PATH_BIN)/readme.txt
50
51
52# install some more files
53INSTALLS = ndpsmb-docs
54ndpsmb-docs_INST = bin/
55ndpsmb-docs_SOURCES = $(SAMBA)/COPYING=>COPYING ndpsmb.ndp instpl.cmd
56OTHER_CLEAN += $(PATH_BIN)/COPYING $(PATH_BIN)/ndpsmb.ndp $(PATH_BIN)/instpl.cmd
57
58
59# packaging stuffs
60ifeq ($(BUILD_TYPE),debug)
61 PACKAGE_NAME = ndpsmb-$(subst .,_,$(VERSION))-$(BUILD)-debug.zip
62else
63 PACKAGE_NAME = ndpsmb-$(subst .,_,$(VERSION))-$(BUILD).zip
64endif
65PACKING += $(PATH_ROOT)/dist/$(PACKAGE_NAME)
66OTHER_CLEAN += $(PATH_ROOT)/dist/$(PACKAGE_NAME)
67
68# now include standard code
69include $(PATH_KBUILD)/rules.kMk
70
71# here follows standard gnu make inference rules
72
73# add new dependancy on build level info
74rc/rc.rc : rc/description.rc
75
76# update bldlevel info
77rc/description.rc: config.kmk
78 @echo Writing build level informations
79 @cp rc/description.rc_ rc/description.rc
80 @BldLevelInf0.cmd $(VERSION) $(BUILD)
81
82# compile help file
83$(PATH_BIN)/ndpsmb.hlp: ./rc/rc.ipf ./rc/rc.h ./H/hmacros.h config.kmk
84 -gcc -E -I./h -I./rc -x c ./rc/rc.ipf > rc.i
85 -@mkdir $(PATH_BIN)
86 $(TOOLKIT)\bin\ipfc.exe rc.i $(PATH_BIN)/ndpsmb.hlp /COUNTRY=001 /CODEPAGE=850
87 rm rc.i
88
89# substitute macros in docs
90$(PATH_BIN)/readme.txt: Config.kmk readme.txt
91 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" readme.txt \
92 | $(SED) "s;_BUILD_;$(BUILD);g" \
93 > $(PATH_BIN)/readme.txt
94
95# final: zip all files!
96$(PATH_ROOT)/dist/$(PACKAGE_NAME): \
97 $(PATH_BIN)/ndpsmb.dll \
98 $(PATH_BIN)/ndpsmb.hlp \
99 $(PATH_BIN)/readme.txt
100 $(QUIET)$(MKDIR) -p $(PATH_ROOT)/dist
101 $(QUIET)$(RM) -f $@
102 $(QUIET)zip -9 -j $@ $(PATH_BIN)/*
103
Note: See TracBrowser for help on using the repository browser.