1# $Id$ 2 3# This is "makefile common part (include file)" template to build husky library 4# using any compiler and make utility. 5# Copy this file into your work directory as make/makefile.inc; 6# set LIBNAME, OBJ*, HEADERS*, PROGRAMS, VER*, (possible) H_DIR, 7# (possible) LIBS and above. 8# (1st: replace XXXXX with library name (not more 5 chars long if possible) 9 10# 11# Common makefiles part (include-file) for XXXXXlib 12 13# Use defines before including this file: 14# _OBJ object files suffix begins with point (".o", ".obj", ... ) 15# _LIB library files suffix begins with point (".a", ".lib", ... ) 16# _DLL dinamic linking library files suffix begins with point (".dll", ".so", ...) 17# LIBPREFIX library filename prefix ("lib", "", ...) 18# LIBSUFFIX library filename suffix (compiler ID, three characters, somewhere empty) 19# DLLPREFIX dinamic linking library prefix (usually empty) 20# DLLSUFFIX dinamic linking library suffix (compiler ID or empty) 21 22# Library name 23LIBNAME = XXXXX 24 25# Version 26VERMAJOR= 0 27VERMINOR= 1 28VERH = $(VERMAJOR).$(VERMINOR) 29VER = $(VERH).0 30 31# Object files (example from huskylib) 32OBJS1 = calendar$(_OBJ) cvtdate$(_OBJ) fexist$(_OBJ) ffind$(_OBJ) genmsgid$(_OBJ) 33OBJS2 = memory$(_OBJ) parsenn$(_OBJ) patmat$(_OBJ) setfsize$(_OBJ) strext$(_OBJ) 34OBJS3 = strftime$(_OBJ) tdelay$(_OBJ) 35OBJS = $(OBJS1) $(OBJS2) $(OBJS3) 36 37# Header files (example from huskylib) 38HEADERS1= calendar.h compiler.h cvtdate.h ffind.h huskylib.h patmat.h 39HEADERS2= parsenn.h strext.h unused.h vixie.h 40HEADERS3= BCD.h BCO.h BCW.h BEOS5.h BORLANDC.h DJGPP.h EMX.h HIGHC.h IBMC_OS2.h 41HEADERS4= MINGW32.h MSC.h MSVC.h SASC.h UNIX.h WATCOMC.h WCD.h WCO.h WCW.h WCX.h 42HEADERS = $(HEADERS1) $(HEADERS2) $(HEADERS3) $(HEADERS4) 43 44# Binary file(s) to build from sources (example from huskylib) 45PROGRAMS= gnmsgid$(_EXE) 46 47SRC_DIR =../src/ 48H_DIR =../h/ 49 50# Usually compose from LIBPREFIX, LIBSUFFIX and LIB. 51# Static library name 52TARGETLIB = $(LIBPREFIX)$(LIBNAME)$(LIBSUFFIX)$(_LIB) 53# Shared library name 54TARGETDLL = $(DLLPREFIX)$(LIBNAME)$(DLLSUFFIX)$(_DLL) 55# Binary package (archive) name 56PACKAGEBASE=$(LIBNAME)$(LIBSUFFIX)-$(VER) 57PACKAGENAME=$(LIBNAME)$(LIBSUFFIX)$(VER)$(_ARC) 58 59 60# List of HUSKY libraries required to build binary file(s) 61# Examples! Change to real please. 62LIBS = -lhusky$(LIBSUFFIX) -lsmapi$(LIBSUFFIX) 63DLLS = ../../$(DLLPREFIX)husky$(DLLSUFFIX)$(_DLL) ../../$(DLLPREFIX)smapi$(DLLSUFFIX)$(_DLL) 64