In GNU make, Variables and functions in all parts of a makefile are expanded when...
[reactos.git] / rosapps / sysutils / regexpl / Makefile
1 # $Id: Makefile,v 1.2 2000/10/08 10:48:10 narnaoud Exp $
2 #
3 # ReactOS makefile for RegExpl
4 #
5
6 include ../../rules.mak
7
8 TARGET_NAME=regexpl
9
10 ROS_DIR=../../../reactos
11 ROS_INC=$(ROS_DIR)/include
12 ROS_LIB=$(ROS_DIR)/lib
13 IMPORT_NTDLL=$(ROS_LIB)/ntdll/ntdll.a
14 IMPORT_FMIFS=$(ROS_LIB)/fmifs/fmifs.a
15 IMPORT_KERNEL32=$(ROS_LIB)/kernel32/kernel32.a
16 IMPORT_ADVAPI32=$(ROS_LIB)/advapi32/advapi32.a
17 IMPORT_USER32=$(ROS_LIB)/user32/user32.a
18 IMPORT_CRTDLL=$(ROS_LIB)/crtdll/crtdll.a
19
20 all: $(TARGET_NAME)$(EXE_POSTFIX)
21
22 OBJECTS = \
23 ArgumentParser.o \
24 Console.o \
25 RegistryExplorer.o \
26 RegistryKey.o \
27 RegistryTree.o \
28 SecurityDescriptor.o \
29 ShellCommand.o \
30 ShellCommandChangeKey.o \
31 ShellCommandConnect.o \
32 ShellCommandDACL.o \
33 ShellCommandDOKA.o \
34 ShellCommandDeleteKey.o \
35 ShellCommandDeleteValue.o \
36 ShellCommandDir.o \
37 ShellCommandExit.o \
38 ShellCommandHelp.o \
39 ShellCommandNewKey.o \
40 ShellCommandOwner.o \
41 ShellCommandSACL.o \
42 ShellCommandSetValue.o \
43 ShellCommandValue.o \
44 ShellCommandVersion.o \
45 ShellCommandsLinkedList.o \
46 CrtSupplement.c \
47 TextHistory.o \
48 $(TARGET_NAME).coff
49
50 CLEAN_FILES = \
51 *.o \
52 $(TARGET_NAME)$(EXE_POSTFIX) \
53 $(TARGET_NAME).sym \
54 $(TARGET_NAME).coff
55
56
57 $(TARGET_NAME)$(EXE_POSTFIX): $(OBJECTS)
58 $(CC) \
59 -Wl,--subsystem,console \
60 -o $(TARGET_NAME) \
61 $(IMPORT_KERNEL32) \
62 $(IMPORT_CRTDLL) \
63 $(IMPORT_USER32) \
64 $(OBJECTS)
65 $(NM) --numeric-sort $(TARGET_NAME)$(EXE_POSTFIX) > $(TARGET_NAME).sym
66
67
68 clean: $(CLEAN_FILES:%=%_clean)
69
70 $(CLEAN_FILES:%=%_clean): %_clean:
71 - $(RM) $*
72
73 .phony: clean $(CLEAN_FILES:%=%_clean)
74
75
76 floppy: $(TARGET:%=$(FLOPPY_DIR)/apps/%)
77
78 $(TARGET:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
79 ifeq ($(DOSCLI),yes)
80 $(CP) $* $(FLOPPY_DIR)\apps\$*
81 else
82 $(CP) $* $(FLOPPY_DIR)/apps/$*
83 endif
84
85
86 dist: $(TARGET:%=../$(DIST_DIR)/apps/%)
87
88 $(TARGET:%=../$(DIST_DIR)/apps/%): ../$(DIST_DIR)/apps/%: %
89 ifeq ($(DOSCLI),yes)
90 $(CP) $* ..\$(DIST_DIR)\apps\$*
91 else
92 $(CP) $* ../$(DIST_DIR)/apps\$*
93 endif
94
95 # EOF
96