b8a0c5a22900f4358f73f66b22b0c692826cd557
[reactos.git] / rosapps / sysutils / makefile
1 # $Id: makefile,v 1.3 2000/02/29 23:57:47 ea Exp $
2 #
3 # ReactOS System Utilities
4 #
5 # 1999-02-16 (Emanuele Aliberti)
6 # Added chkdskx.c and formatx.c by by Mark Russinovich
7 # (mark@sysinternals.com) and shutdown.c
8 #
9 # 1999-03-03 (Emanuele Aliberti)
10 # Added login.c and chklib.c
11 #
12 # 1999-03-16 (Emanuele Aliberti)
13 # Added regnav.c
14 #
15 # 1999-12-19 (ea)
16 # Added qsi.c
17 #
18
19 ROSINC=../../reactos/include
20
21 TARGET=regnav.exe chklib.exe
22 # chkdsk.exe format.exe \
23 # chklib.exe shutdown.exe regnav.exe
24 # login.exe chklib.exe shutdown.exe regnav.exe
25
26 all: $(TARGET)
27
28 # By Mark Russinovich
29
30 chkdsk.exe: chkdsk.o win32err.o wmain.o
31 $(CC) chkdsk.o win32err.o wmain.o \
32 -o chkdsk.exe \
33 -lkernel32 \
34 -lcrtdll \
35 -lfmifs
36 $(NM) --numeric-sort chkdsk.exe > chkdsk.sym
37
38 format.exe: format.o win32err.o wmain.o
39 $(CC) format.o win32err.o wmain.o \
40 -o format.exe \
41 -lkernel32 \
42 -lcrtdll \
43 -lfmifs
44 $(NM) --numeric-sort format.exe > format.sym
45
46 #---
47
48 chklib.exe: chklib.o win32err.o
49 $(CC) chklib.o win32err.o \
50 -o chklib.exe \
51 -lkernel32 \
52 -lcrtdll
53 $(NM) --numeric-sort chklib.exe > chklib.sym
54
55
56 regnav.exe: regnav.o win32err.o
57 $(CC) regnav.o win32err.o \
58 -o regnav.exe \
59 -lkernel32 \
60 -lcrtdll
61 $(NM) --numeric-sort regnav.exe > regnav.sym
62
63
64 shutdown.exe: shutdown.o win32err.o
65 $(CC) shutdown.o win32err.o \
66 -o shutdown.exe \
67 -lkernel32 \
68 -luser32 \
69 -lcrtdll
70 $(NM) --numeric-sort shutdown.exe > shutdown.sym
71
72 qsi.exe: qsi.o
73 $(CC) qsi.o \
74 ../../reactos/lib/ntdll/ntdll.a
75 -o qsi.exe \
76 -lkernel32 \
77 -lcrtdll
78 $(NM) --numeric-sort qsi.exe > qsi.sym
79
80 qsi.o: qsi.c
81
82 #---
83
84 CLEAN_FILES = *.o *.exe *.sym
85
86 clean: $(CLEAN_FILES:%=%_clean)
87
88 $(CLEAN_FILES:%=%_clean): %_clean:
89 - $(RM) $*
90
91 .phony: clean $(CLEAN_FILES:%=%_clean)
92
93
94 floppy: $(TARGET:%=$(FLOPPY_DIR)/apps/%)
95
96 $(TARGET:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
97 ifeq ($(DOSCLI),yes)
98 $(CP) $* $(FLOPPY_DIR)\apps\$*
99 else
100 $(CP) $* $(FLOPPY_DIR)/apps/$*
101 endif
102
103
104 dist: $(TARGET:%=../$(DIST_DIR)/apps/%)
105
106 $(TARGET:%=../$(DIST_DIR)/apps/%): ../$(DIST_DIR)/apps/%: %
107 ifeq ($(DOSCLI),yes)
108 $(CP) $* ..\$(DIST_DIR)\apps\$*
109 else
110 $(CP) $* ../$(DIST_DIR)/apps/$*
111 endif
112
113 include ../rules.mak
114
115 # EOF