4 # GNU Makefile for w32 VC++ environment.
6 # Copyright (c) 2000-2005 Yigal Hochberg, DMH Software.
7 # Copyright (c) 2000 E. Schoenfelder, Gaertner Datensysteme Braunschweig.
8 # Copyright (c) 2000 J. Schoenwaelder, Technical University of Braunschweig.
10 # See the file "COPYING" for information on usage and redistribution
11 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 # @(#) $Id: GNUmakefile 2409 2005-05-30 13:14:21Z strauss $
16 ## Project directories -- these may need to be customized for your site
18 ## ROOT -- top of the source tree.
19 ## TMPDIR -- location for .obj files.
20 ## TOOLS32 -- location of VC++ compiler installation.
24 TOOLS32 = C:\PROGRA~1\MICROS~2\VC98
27 ## Installation paths:
29 ## MIBROOT -- definition for default search path (unix-style)
30 ## MIBDIR -- same in windows style
31 ## BINDIR -- destination for the binaries (smidump.exe, ...)
32 ## LIBDIR -- destination for the library (smi.lib)
36 MIBDIR = $(INSTROOT)\mibs
37 BINDIR = $(INSTROOT)\bin
38 LIBDIR = $(INSTROOT)\lib
41 ## This include is for smidump_SOURCES definition.
43 include ../tools/Makefile.am
48 PATH := $(TOOLS32)\bin;$(PATH)
53 CFLAGS = -nologo -W3 -DYY_NO_UNISTD_H
54 CC_INCL = #-I$(TOOLS32)/include
64 #DEBUG = -W3 -Zi -Od /Yd
65 INCLUDES = -I$(ROOT)/lib -I$(ROOT)/win $(CC_INCL)
71 LIBSMIOBJS = $(patsubst %.c, %.obj, $(notdir $(wildcard ../lib/*.c))) win.obj \
77 SMIQUERYOBJS = smiquery.obj
78 SMILINTOBJS = smilint.obj
79 SMIDUMPOBJS = $(filter-out %.h, $(smidump_SOURCES:.c=.obj))
87 tools: smiquery.exe smilint.exe smidump.exe
89 smi.lib: $(LIBSMIOBJS)
90 smiquery.exe: $(SMIQUERYOBJS) smi.lib
91 smilint.exe: $(SMILINTOBJS) smi.lib
92 smidump.exe: $(SMIDUMPOBJS) smi.lib
102 install: all install-doc install-bin install-lib install-mibs
106 $(CP) ..\README $(INSTROOT)
107 $(CP) ..\COPYING $(INSTROOT)
108 $(CP) README.win $(INSTROOT)
109 $(MKDIR) $(INSTROOT)\doc
110 $(CP) ..\doc\*.txt $(INSTROOT)\doc
111 $(CP) ..\doc\*.ps $(INSTROOT)\doc
115 $(CP) *.exe $(BINDIR)
119 $(CP) *.lib $(LIBDIR)
123 $(MKDIR) $(MIBDIR)\iana
124 $(CP) ..\mibs\iana\*.* $(MIBDIR)\iana
125 $(MKDIR) $(MIBDIR)\ietf
126 $(CP) ..\mibs\ietf\*.* $(MIBDIR)\ietf
127 $(MKDIR) $(MIBDIR)\irtf
128 $(CP) ..\mibs\irtf\*.* $(MIBDIR)\irtf
129 $(MKDIR) $(MIBDIR)\tubs
130 $(CP) ..\mibs\tubs\*.* $(MIBDIR)\tubs
131 $(MKDIR) $(MIBDIR)\site
140 $(CC) $(CFLAGS) -c $(INCLUDES) $(DEFINES) -Fo$@ $<
143 $(CC) $(CFLAGS) $(DEFINES) -o $(notdir $@) $^
146 $(AR) $(ARFLAGS) -out:$(notdir $@) $^
149 ## Special compilation rules for scanner files
151 scanner-objs = scanner-smi.obj scanner-sming.obj
153 $(scanner-objs) : %.obj : %.c
154 $(CC) -c $(CFLAGS) -D__STDC__ $(INCLUDES) $(DEFINES) -Fo$@ $<