Blame win/Makefile.mingw

Packit Service 9ccfef
#
Packit Service 9ccfef
# Makefile.mingw --
Packit Service 9ccfef
#
Packit Service 9ccfef
#       Makefile for win32 mingw environment.
Packit Service 9ccfef
#
Packit Service 9ccfef
# See the file "COPYING" for information on usage and redistribution
Packit Service 9ccfef
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Packit Service 9ccfef
#
Packit Service 9ccfef
# @(#) $Id: Makefile.mingw 7949 2008-03-22 16:19:33Z schoenw $
Packit Service 9ccfef
#
Packit Service 9ccfef
Packit Service 9ccfef
##
Packit Service 9ccfef
## Installation paths: 
Packit Service 9ccfef
##
Packit Service 9ccfef
## MIBDIR   -- MIB destination (let it end with /mibs; check againt config.h)
Packit Service 9ccfef
## PIBDIR   -- MIB destination (let it end with /pibs; check againt config.h)
Packit Service 9ccfef
## BINDIR   -- destination for the binaries (smidump.exe, ...)
Packit Service 9ccfef
##
Packit Service 9ccfef
# INSTROOT = c:\smi
Packit Service 9ccfef
INSTROOT = c/smi
Packit Service 9ccfef
MIBDIR = $(INSTROOT)/mibs
Packit Service 9ccfef
PIBDIR = $(INSTROOT)/pibs
Packit Service 9ccfef
BINDIR = $(INSTROOT)/bin
Packit Service 9ccfef
LIBDIR = $(INSTROOT)/lib
Packit Service 9ccfef
Packit Service 9ccfef
##
Packit Service 9ccfef
## Commands:
Packit Service 9ccfef
##
Packit Service 9ccfef
Packit Service 9ccfef
##
Packit Service 9ccfef
## Linux cross-compile is now the way to go.
Packit Service 9ccfef
## compilation within win-environment works, but you need to
Packit Service 9ccfef
## change path an options settings to get installation work.
Packit Service 9ccfef
## 
Packit Service 9ccfef
# CC	= gcc
Packit Service 9ccfef
# CP	= copy
Packit Service 9ccfef
# RM      = del
Packit Service 9ccfef
# AR	= ar
Packit Service 9ccfef
# MKDIR	= -mkdir
Packit Service 9ccfef
Packit Service 9ccfef
##
Packit Service 9ccfef
## Debian Linux mingw cross-compiler version:
Packit Service 9ccfef
##
Packit Service 9ccfef
CC	= i586-mingw32msvc-gcc
Packit Service 9ccfef
CP	= cp
Packit Service 9ccfef
RM	= rm -f
Packit Service 9ccfef
AR	= i586-mingw32msvc-ar
Packit Service 9ccfef
MKDIR	= -mkdir
Packit Service 9ccfef
Packit Service 9ccfef
##
Packit Service 9ccfef
## Definitions:
Packit Service 9ccfef
##
Packit Service 9ccfef
CFLAGS = -O2 -Wall
Packit Service 9ccfef
INCLUDES = -I. -I../lib -I../tools
Packit Service 9ccfef
Packit Service 9ccfef
## 
Packit Service 9ccfef
## Global Makefile settings
Packit Service 9ccfef
##
Packit Service 9ccfef
LIBSMIOBJS = \
Packit Service 9ccfef
	win.o \
Packit Service 9ccfef
	data.o \
Packit Service 9ccfef
	check.o \
Packit Service 9ccfef
	error.o \
Packit Service 9ccfef
	util.o \
Packit Service 9ccfef
	smi.o \
Packit Service 9ccfef
	parser-smi.o \
Packit Service 9ccfef
	scanner-smi.o \
Packit Service 9ccfef
	parser-sming.o \
Packit Service 9ccfef
	scanner-sming.o \
Packit Service 9ccfef
	snprintf.o
Packit Service 9ccfef
Packit Service 9ccfef
TOOLSOBJS = \
Packit Service 9ccfef
	smiquery.o \
Packit Service 9ccfef
	smilint.o \
Packit Service 9ccfef
	smidump.o \
Packit Service 9ccfef
	smidiff.o \
Packit Service 9ccfef
	smixlate.o \
Packit Service 9ccfef
	shhopt.o \
Packit Service 9ccfef
	fprint.o \
Packit Service 9ccfef
	fortopat.o \
Packit Service 9ccfef
	rea.o \
Packit Service 9ccfef
 	dstring.o \
Packit Service 9ccfef
	dump-sming.o \
Packit Service 9ccfef
	dump-smi.o \
Packit Service 9ccfef
	dump-imports.o \
Packit Service 9ccfef
	dump-types.o \
Packit Service 9ccfef
	dump-tree.o \
Packit Service 9ccfef
	dump-mosy.o \
Packit Service 9ccfef
	dump-corba.o \
Packit Service 9ccfef
	dump-cm.o \
Packit Service 9ccfef
	dump-jax.o \
Packit Service 9ccfef
	dump-netsnmp.o \
Packit Service 9ccfef
	dump-xml.o \
Packit Service 9ccfef
	dump-identifiers.o \
Packit Service 9ccfef
	dump-metrics.o \
Packit Service 9ccfef
	dump-python.o \
Packit Service 9ccfef
	dump-perl.o \
Packit Service 9ccfef
	dump-scli.o \
Packit Service 9ccfef
	dump-xsd.o \
Packit Service 9ccfef
	dump-sppi.o \
Packit Service 9ccfef
	dump-sizes.o \
Packit Service 9ccfef
	dump-svg.o \
Packit Service 9ccfef
	dump-compliance.o \
Packit Service 9ccfef
	dump-yang.o \
Packit Service 9ccfef
	dump-boilerplate.o
Packit Service 9ccfef
#	dump-smiv3.o
Packit Service 9ccfef
#	dump-fig.o
Packit Service 9ccfef
Packit Service 9ccfef
SMILIB = libsmi.a
Packit Service 9ccfef
Packit Service 9ccfef
##
Packit Service 9ccfef
## Implicit Targets
Packit Service 9ccfef
##
Packit Service 9ccfef
VPATH = .:../lib:../tools
Packit Service 9ccfef
.c.o:
Packit Service 9ccfef
	$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
Packit Service 9ccfef
Packit Service 9ccfef
Packit Service 9ccfef
##
Packit Service 9ccfef
## Targets
Packit Service 9ccfef
##
Packit Service 9ccfef
all:	libs tools
Packit Service 9ccfef
Packit Service 9ccfef
libs:	$(SMILIB)
Packit Service 9ccfef
Packit Service 9ccfef
$(SMILIB):	$(LIBSMIOBJS)
Packit Service 9ccfef
	$(AR) -ruv $(SMILIB) $(LIBSMIOBJS)
Packit Service 9ccfef
Packit Service 9ccfef
tools:	smiquery.exe smilint.exe smidump.exe smidiff.exe smixlate.exe
Packit Service 9ccfef
Packit Service 9ccfef
smiquery.exe:	$(TOOLSOBJS) $(SMILIB)
Packit Service 9ccfef
	$(CC) $(CFLAGS) -o smiquery.exe smiquery.o shhopt.o $(SMILIB)
Packit Service 9ccfef
Packit Service 9ccfef
smilint.exe:	$(TOOLSOBJS) $(SMILIB)
Packit Service 9ccfef
	$(CC) $(CFLAGS) -o smilint.exe smilint.o shhopt.o $(SMILIB)
Packit Service 9ccfef
Packit Service 9ccfef
smidump.exe:	$(TOOLSOBJS) $(SMILIB)
Packit Service 9ccfef
	$(CC) $(CFLAGS) \
Packit Service 9ccfef
		-o smidump.exe smidump.o dump-sming.o dump-smi.o \
Packit Service 9ccfef
		dump-imports.o dump-types.o dump-tree.o dump-mosy.o \
Packit Service 9ccfef
		dump-corba.o dump-netsnmp.o dump-cm.o dump-jax.o dump-xml.o \
Packit Service 9ccfef
		dump-identifiers.o dump-metrics.o dump-python.o dump-perl.o \
Packit Service 9ccfef
		dump-scli.o dump-xsd.o dump-sppi.o dump-sizes.o dump-svg.o \
Packit Service 9ccfef
		dump-compliance.o dump-yang.o dump-boilerplate.o \
Packit Service 9ccfef
		shhopt.o fprint.o fortopat.o rea.o $(SMILIB)
Packit Service 9ccfef
Packit Service 9ccfef
smidiff.exe:	$(TOOLSOBJS) $(SMILIB)
Packit Service 9ccfef
	$(CC) $(CFLAGS) -o smidiff.exe smidiff.o shhopt.o $(SMILIB)
Packit Service 9ccfef
Packit Service 9ccfef
smixlate.exe:	$(TOOLSOBJS) $(SMILIB)
Packit Service 9ccfef
	$(CC) $(CFLAGS) -o smixlate.exe smixlate.o shhopt.o dstring.o $(SMILIB)
Packit Service 9ccfef
Packit Service 9ccfef
clean:
Packit Service 9ccfef
	$(RM) *.o
Packit Service 9ccfef
	$(RM) *.a
Packit Service 9ccfef
	$(RM) *.exe
Packit Service 9ccfef
Packit Service 9ccfef
install:	all install-doc install-bin install-mibs install-pibs
Packit Service 9ccfef
Packit Service 9ccfef
install-doc:
Packit Service 9ccfef
	$(MKDIR) $(INSTROOT)
Packit Service 9ccfef
	$(CP) ../README $(INSTROOT)
Packit Service 9ccfef
	$(CP) ../COPYING $(INSTROOT)
Packit Service 9ccfef
	$(CP) ../ChangeLog $(INSTROOT)
Packit Service 9ccfef
	$(CP) ../THANKS $(INSTROOT)
Packit Service 9ccfef
	$(CP) ../TODO $(INSTROOT)
Packit Service 9ccfef
	$(CP) README.mingw $(INSTROOT)
Packit Service 9ccfef
	$(MKDIR) $(INSTROOT)/doc
Packit Service 9ccfef
	-$(CP) ../doc/*.txt $(INSTROOT)/doc
Packit Service 9ccfef
	-$(CP) ../doc/*.ps $(INSTROOT)/doc
Packit Service 9ccfef
	-$(CP) ../doc/smi* $(INSTROOT)/doc
Packit Service 9ccfef
Packit Service 9ccfef
install-bin:
Packit Service 9ccfef
	$(MKDIR) $(BINDIR)
Packit Service 9ccfef
	$(CP) *.exe $(BINDIR)
Packit Service 9ccfef
	$(MKDIR) $(LIBDIR)
Packit Service 9ccfef
	$(CP) *.a $(LIBDIR)
Packit Service 9ccfef
Packit Service 9ccfef
install-mibs:
Packit Service 9ccfef
	$(MKDIR) $(MIBDIR)
Packit Service 9ccfef
	$(MKDIR) $(MIBDIR)/iana
Packit Service 9ccfef
	-$(CP) ../mibs/iana/* $(MIBDIR)/iana
Packit Service 9ccfef
	$(MKDIR) $(MIBDIR)/ietf
Packit Service 9ccfef
	-$(CP) ../mibs/ietf/* $(MIBDIR)/ietf
Packit Service 9ccfef
	$(MKDIR) $(MIBDIR)/irtf
Packit Service 9ccfef
	-$(CP) ../mibs/irtf/* $(MIBDIR)/irtf
Packit Service 9ccfef
	$(MKDIR) $(MIBDIR)/tubs
Packit Service 9ccfef
	-$(CP) ../mibs/tubs/* $(MIBDIR)/tubs
Packit Service 9ccfef
	$(MKDIR) $(MIBDIR)/site
Packit Service 9ccfef
	-$(CP) ../mibs/site/* $(MIBDIR)/site
Packit Service 9ccfef
Packit Service 9ccfef
install-pibs:
Packit Service 9ccfef
	$(MKDIR) $(PIBDIR)
Packit Service 9ccfef
	$(MKDIR) $(PIBDIR)/ietf
Packit Service 9ccfef
	-$(CP) ../pibs/ietf/* $(PIBDIR)/ietf
Packit Service 9ccfef
	$(MKDIR) $(PIBDIR)/tubs
Packit Service 9ccfef
	-$(CP) ../pibs/tubs/* $(PIBDIR)/tubs
Packit Service 9ccfef
	$(MKDIR) $(PIBDIR)/site
Packit Service 9ccfef
	-$(CP) ../pibs/site/* $(PIBDIR)/site
Packit Service 9ccfef
Packit Service 9ccfef
zip: install
Packit Service 9ccfef
	(cd c; zip -r ../libsmi.zip .)
Packit Service 9ccfef
Packit Service 9ccfef
##