506d052e8a794dd1905a07e950f181fbf9cf38a4
[reactos.git] / posix / lib / psxdll / Makefile
1 # $Id: Makefile,v 1.7 2002/03/23 18:13:33 hyperion Exp $
2
3 PATH_TO_TOP = ../../../..
4
5 TARGET_TYPE = dynlink
6
7 TARGET_NAME = psxdll
8
9 TARGET_LIBPATH = $(PATH_TO_TOP)/dk/psx/lib
10
11 TARGET_LFLAGS = -nostartfiles
12
13 TARGET_SDKLIBS = ntdll.a
14
15 TARGET_BASE = 0x68EB0000
16
17 TARGET_ENTRY = _DllMain@12
18
19 TARGET_CFLAGS =\
20 -Wall \
21 -nostdinc \
22 -nostdlib \
23 -fno-builtin \
24 -I$(PATH_TO_TOP)/subsys/psx/include \
25 -I$(PATH_TO_TOP)/include \
26 -D__PSXDLL__ \
27 -D__PSX_DEBUG_WANT_ALL__
28
29 TARGET_OBJECTS = $(TARGET_NAME).o
30
31 TARGET_CLEAN = $(OBJECTS) csrapi.a
32
33 include $(PATH_TO_TOP)/rules.mak
34 include $(TOOLS_PATH)/helper.mk
35
36 OBJECTS_MISC = \
37 misc/main.o \
38 misc/init.o \
39 misc/heap.o \
40 misc/interlock.o \
41 misc/safeobj.o \
42 misc/spawn.o \
43 misc/path.o \
44 misc/pdata.o \
45 misc/fdtable.o
46
47 OBJECTS_DIRENT = \
48 dirent/opendir.o \
49 dirent/readdir.o \
50 dirent/closedir.o
51
52 OBJECTS_DLFCN = \
53 dlfcn/dlopen.o \
54 dlfcn/dlclose.o \
55 dlfcn/dlsym.o \
56 dlfcn/dlerror.o
57
58 OBJECTS_ERRNO = \
59 errno/errno.o
60
61 OBJECTS_FCNTL = \
62 fcntl/open.o \
63 fcntl/fcntl.o
64
65 OBJECTS_LIBGEN = \
66 libgen/basename.o
67
68 OBJECTS_SCHED = \
69 sched/yield.o
70
71 OBJECTS_SIGNAL = \
72 pthread/kill.o \
73 signal/raise.o
74
75 OBJECTS_STDLIB = \
76 stdlib/abort.o \
77 stdlib/malloc.o \
78 stdlib/exit.o
79
80 OBJECTS_STRING = \
81 string/strdup.o \
82 string/strerror.o
83
84 OBJECTS_PTHREAD = \
85 pthread/create.o \
86 pthread/exit.o \
87 pthread/join.o \
88 pthread/mutex.o \
89 pthread/self.o
90
91 OBJECTS_SYS_UTSNAME = \
92 sys/utsname/uname.o
93
94 OBJECTS_UNISTD = \
95 unistd/close.o \
96 unistd/dup.o \
97 unistd/getcwd.o \
98 unistd/getpid.o \
99 unistd/getppid.o \
100 unistd/read.o \
101 unistd/write.o
102
103 OBJECTS = \
104 $(OBJECTS_MISC) \
105 $(OBJECTS_DIRENT) \
106 $(OBJECTS_DLFCN) \
107 $(OBJECTS_ERRNO) \
108 $(OBJECTS_FCNTL) \
109 $(OBJECTS_LIBGEN) \
110 $(OBJECTS_SCHED) \
111 $(OBJECTS_SIGNAL) \
112 $(OBJECTS_STDLIB) \
113 $(OBJECTS_STRING) \
114 $(OBJECTS_PTHREAD) \
115 $(OBJECTS_SYS_UTSNAME) \
116 $(OBJECTS_UNISTD)
117
118 DEP_OBJECTS = $(OBJECTS)
119
120 include $(TOOLS_PATH)/depend.mk
121
122 DTFLAGS = -k -l $@
123
124 $(TARGET_NAME).a: $(TARGET_NAME).def
125 $(DLLTOOL) \
126 $(DTFLAGS) \
127 -D $(TARGET_NAME).dll \
128 -d $(TARGET_NAME).def
129
130 csrapi.a: csrapi.def
131 $(DLLTOOL) \
132 $(DTFLAGS) \
133 -D ntdll.dll \
134 -d csrapi.def
135
136 $(TARGET_NAME).o: csrapi.a $(OBJECTS)
137 $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
138
139
140 # EOF