55a2bccd0d8db5fb9ce02569a3b79a066468e5d3
[reactos.git] / rosapps / sysutils / makefile
1 # $Id: makefile,v 1.2 1999/10/03 22:12:07 ekohl 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
16 ROSINC=../../reactos/include
17
18 TARGET=regnav.exe
19 # chkdsk.exe format.exe \
20 # chklib.exe shutdown.exe regnav.exe
21 # login.exe chklib.exe shutdown.exe regnav.exe
22
23 all: $(TARGET)
24
25 # By Mark Russinovich
26
27 chkdsk.exe: chkdsk.o win32err.o wmain.o
28 $(CC) chkdsk.o win32err.o wmain.o \
29 -o chkdsk.exe \
30 -lkernel32 \
31 -lcrtdll \
32 -lfmifs
33 $(NM) --numeric-sort chkdsk.exe > chkdsk.sym
34
35 format.exe: format.o win32err.o wmain.o
36 $(CC) format.o win32err.o wmain.o \
37 -o format.exe \
38 -lkernel32 \
39 -lcrtdll \
40 -lfmifs
41 $(NM) --numeric-sort format.exe > format.sym
42 #---
43
44 #login.exe: login.o
45 # $(CC) login.o \
46 # -o login.exe \
47 # -lntdll \
48 # -Wl,--subsystem native:4.0
49 # $(NM) --numeric-sort login.exe > login.sym
50
51 chklib.exe: chklib.o win32err.o
52 $(CC) chklib.o win32err.o \
53 -o chklib.exe \
54 -lkernel32 \
55 -lcrtdll
56 $(NM) --numeric-sort chklib.exe > chklib.sym
57
58
59 regnav.exe: regnav.o win32err.o
60 $(CC) regnav.o win32err.o \
61 -o regnav.exe \
62 -lkernel32 \
63 -lcrtdll
64 $(NM) --numeric-sort regnav.exe > regnav.sym
65
66
67 shutdown.exe: shutdown.o win32err.o
68 $(CC) shutdown.o win32err.o \
69 -o shutdown.exe \
70 -lkernel32 \
71 -luser32 \
72 -lcrtdll
73 $(NM) --numeric-sort shutdown.exe > shutdown.sym
74
75 #---
76
77 CLEAN_FILES = *.o *.exe *.sym
78
79 clean: $(CLEAN_FILES:%=%_clean)
80
81 $(CLEAN_FILES:%=%_clean): %_clean:
82 - $(RM) $*
83
84 .phony: clean $(CLEAN_FILES:%=%_clean)
85
86
87 floppy: $(TARGET:%=$(FLOPPY_DIR)/apps/%)
88
89 $(TARGET:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
90 ifeq ($(DOSCLI),yes)
91 $(CP) $* $(FLOPPY_DIR)\apps\$*
92 else
93 $(CP) $* $(FLOPPY_DIR)/apps/$*
94 endif
95
96
97 dist: $(TARGET:%=../$(DIST_DIR)/apps/%)
98
99 $(TARGET:%=../$(DIST_DIR)/apps/%): ../$(DIST_DIR)/apps/%: %
100 ifeq ($(DOSCLI),yes)
101 $(CP) $* ..\$(DIST_DIR)\apps\$*
102 else
103 $(CP) $* ../$(DIST_DIR)/apps/$*
104 endif
105
106 include ../rules.mak
107
108 # EOF