re-worked ndis to do device detection from a win2k-style registry enum database,...
[reactos.git] / freeldr / fdebug / Makefile
1 #
2 # FreeLoader
3 # Copyright (C) 1999 - 2003 Brian Palmer <brianp@sginet.com>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #
19
20
21 # Windows is default host environment
22 ifeq ($(HOST),)
23 HOST = mingw32-windows
24 endif
25
26 #
27 # Choose various options
28 #
29 ifeq ($(HOST),mingw32-linux)
30 RM = rm -f
31 CP = cp -f
32 MKDIR = mkdir
33 SEP = /
34 CC = mingw32-gcc
35 LD = mingw32-ld
36 WINDRES = mingw32-windres
37 else
38 RM = cmd /C del
39 CP = copy /Y
40 MKDIR = md
41 SEP = \$(EMPTY_VAR)
42 CC = gcc
43 LD = ld
44 RM = cmd /C del
45 WINDRES = windres
46 endif
47
48 FLAGS = -Wall
49
50 OBJS = rs232.o fdebug.o fdebug.res
51
52 .PHONY : clean
53
54 all: fdebug.exe
55
56 fdebug.exe: $(OBJS)
57 @echo ===================================================== LINKING fdebug
58 $(CC) $(FLAGS) -o fdebug.exe $(OBJS) -lgdi32 -lcomdlg32 -Wl,--subsystem,windows
59
60 fdebug.res: fdebug.rc resource.h
61 @echo ===================================================== Compiling $*
62 $(WINDRES) -o fdebug.res fdebug.rc -O coff
63
64 fdebug.o: fdebug.c rs232.h
65 @echo ===================================================== Compiling $*
66 $(CC) $(FLAGS) -o fdebug.o -c fdebug.c
67
68 rs232.o: rs232.c rs232.h
69 @echo ===================================================== Compiling $*
70 $(CC) $(FLAGS) -o rs232.o -c rs232.c
71
72 clean:
73 @-$(RM) *.o
74 @-$(RM) *.res
75 @-$(RM) *.exe
76 @echo Clean ALL done.