TARGET_BASE = 0x77f00000
-TARGET_CFLAGS = -DKERNEL32_BASE=$(TARGET_DLLBASE) -I./
+TARGET_LFLAGS = -nostartfiles -nostdlib
-TARGET_LFLAGS = -nostartfiles
-
-TARGET_SDKLIBS = ntdll.a
+TARGET_SDKLIBS = rosrtl.a ntdll.a
TARGET_GCCLIBS = gcc
TARGET_PCH = k32.h
-TARGET_OBJECTS = $(TARGET_NAME).o
-
-TARGET_CLEAN = except/*.o file/*.o mem/*.o misc/*.o nls/*.o \
- process/*.o string/*.o synch/*.o thread/*.o
-
-
-include $(PATH_TO_TOP)/rules.mak
-
-include $(TOOLS_PATH)/helper.mk
-
-depends:
- make -f errormsg.mak
-
-.PHONY: depends
+TARGET_CLEAN = errcodes.rc msg?????.bin
SYNCH_OBJECTS = synch/critical.o synch/event.o synch/intrlck.o synch/mutex.o \
synch/sem.o synch/timer.o synch/wait.o
misc/dllmain.o misc/comm.o misc/errormsg.o \
misc/console.o misc/time.o misc/toolhelp.o \
misc/stubs.o misc/ldr.o misc/res.o \
- misc/debug.o misc/sysinfo.o misc/profile.o \
+ misc/sysinfo.o misc/profile.o \
misc/mbchars.o misc/muldiv.o misc/getname.o \
misc/perfcnt.o
MEM_OBJECTS = mem/global.o mem/heap.o mem/isbad.o mem/local.o \
mem/procmem.o mem/section.o mem/virtual.o
-
NLS_OBJECTS = nls/codepage.o nls/cpmisc.o \
nls/cptable.o nls/lctable.o \
nls/lcAFK.o nls/lcBEL.o nls/lcBGR.o nls/lcCAT.o \
nls/cp10000.o nls/cp10006.o nls/cp10007.o \
nls/cp10029.o nls/cp10079.o nls/cp10081.o
-
THREAD_OBJECTS = \
thread/fiber.o \
thread/thread.o \
EXCEPT_OBJECTS = except/except.o
-OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
- $(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
- $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS)
+DEBUG_OBJECTS = debug/debugger.o debug/output.o debug/break.o
+
+TARGET_OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
+ $(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
+ $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS) $(DEBUG_OBJECTS)
#$(NLS_OBJECTS)
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+include $(TOOLS_PATH)/depend.mk
+
+$(TARGET_NAME).coff: errcodes.rc
-$(TARGET_NAME).o: $(OBJECTS) errcodes.rc
- $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
+errcodes.rc: $(TARGET_NAME).mc
+ $(MC) \
+ -H $(PATH_TO_TOP)/include/reactos/errcodes.h \
+ -o errcodes.rc \
+ $(TARGET_NAME).mc
%/TAGS:
etags -o $(@D)/TAGS $(@D)/\*.c