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