/[svn]/liblscp/trunk/win32/Makefile.msvc
ViewVC logotype

Annotation of /liblscp/trunk/win32/Makefile.msvc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103 - (hide annotations) (download)
Fri Jun 4 14:32:51 2004 UTC (19 years, 10 months ago) by capela
File size: 1903 byte(s)
Initial alpha release.

1 capela 103 # Makefile.msvc - liblscp.lib
2     # For Microsoft Visual C++ 4.0 and later.
3     #
4     # Usage: nmake /f Makefile.msvc
5     #
6    
7     CC = cl
8     LD = link
9     AR = $(LD) /LIB
10     RM = del
11    
12     LIBNAME = liblscp
13    
14     INCDIR = ..\lscp
15     SRCDIR = ..\src
16    
17     CCFLAGS = -O -W3 -nologo -I..
18     LDFLAGS =
19     LDLIBS = $(LIBNAME).lib wsock32.lib
20    
21     all: $(LIBNAME).lib examples
22    
23     #
24     # Static library build rules.
25     #
26    
27     thread.obj: $(SRCDIR)\thread.c $(INCDIR)\thread.h
28     $(CC) $(CCFLAGS) -c $(SRCDIR)\thread.c
29    
30     socket.obj: $(SRCDIR)\socket.c $(INCDIR)\socket.h
31     $(CC) $(CCFLAGS) -c $(SRCDIR)\socket.c
32    
33     client.obj: $(SRCDIR)\client.c $(INCDIR)\client.h
34     $(CC) $(CCFLAGS) -c $(SRCDIR)\client.c
35    
36     device.obj: $(SRCDIR)\device.c $(INCDIR)\device.h
37     $(CC) $(CCFLAGS) -c $(SRCDIR)\device.c
38    
39     common.obj: $(SRCDIR)\common.c $(SRCDIR)\common.h
40     $(CC) $(CCFLAGS) -c $(SRCDIR)\common.c
41    
42     $(LIBNAME).lib: thread.obj socket.obj client.obj device.obj common.obj
43     echo dummy > $(LIBNAME).lib
44     $(RM) $(LIBNAME).lib
45     $(AR) /OUT:$(LIBNAME).lib thread.obj socket.obj client.obj device.obj common.obj
46    
47    
48     #
49     # Examples build rules.
50     #
51    
52     EXDIR = ..\examples
53    
54     examples: example_client.exe example_server.exe
55    
56     server.obj: $(EXDIR)\server.c $(EXDIR)\server.h
57     $(CC) $(CCFLAGS) -c $(EXDIR)\server.c
58    
59     parser.obj: $(EXDIR)\parser.c $(EXDIR)\parser.h
60     $(CC) $(CCFLAGS) -c $(EXDIR)\parser.c
61    
62     example_client.obj: $(EXDIR)\example_client.c
63     $(CC) $(CCFLAGS) -I$(EXDIR) -c $(EXDIR)\example_client.c
64    
65     example_server.obj: $(EXDIR)\example_server.c
66     $(CC) $(CCFLAGS) -I$(EXDIR) -c $(EXDIR)\example_server.c
67    
68     example_client.exe: example_client.obj $(LIBNAME).lib
69     $(LD) $(LDFLAGS) example_client.obj $(LDLIBS) /OUT:example_client.exe /SUBSYSTEM:CONSOLE
70    
71     example_server.exe: example_server.obj server.obj parser.obj $(LIBNAME).lib
72     $(LD) $(LDFLAGS) example_server.obj server.obj parser.obj $(LDLIBS) /OUT:example_server.exe /SUBSYSTEM:CONSOLE
73    
74    
75     #
76     # Common rules.
77     #
78    
79     clean:
80     del *.obj
81     del *.lib
82     del *.exe
83     del *.bak
84    

  ViewVC Help
Powered by ViewVC