| 1 | # $Id: makefile,v 1.16 2000-03-07 11:11:10 bird Exp $
|
|---|
| 2 |
|
|---|
| 3 | #
|
|---|
| 4 | # Odin32 API
|
|---|
| 5 | #
|
|---|
| 6 | # pe.exe makefile
|
|---|
| 7 | #
|
|---|
| 8 |
|
|---|
| 9 | # Tell that we're producing an executable
|
|---|
| 10 | EXETARGET = 1
|
|---|
| 11 |
|
|---|
| 12 | # Directory macros.
|
|---|
| 13 | PDWIN32_INCLUDE = ..\..\include
|
|---|
| 14 | PDWIN32_LIB = ..\..\lib
|
|---|
| 15 | PDWIN32_BIN = ..\..\$(OBJDIR)
|
|---|
| 16 | PDWIN32_TOOLS = ..\..\tools\bin
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 | # Compiler, tools, and interference rules.
|
|---|
| 20 | !include $(PDWIN32_INCLUDE)/pdwin32.mk
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | # Flag overloads and local macros.
|
|---|
| 24 | CLEANEXTRAS = $(PDWIN32_BIN)\$(TARGET).exe
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 | # Object files. All objects should be prefixed with $(OBJDIR)!
|
|---|
| 28 | OBJS = $(OBJDIR)\pe.obj
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | # Target name - name of the dll without extention and path.
|
|---|
| 32 | TARGET = pe
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 | # All rule - build objs, target dll, copies dll to bin and makes libs.
|
|---|
| 36 | all: $(OBJDIR) \
|
|---|
| 37 | $(OBJDIR)\$(TARGET).exe \
|
|---|
| 38 | $(PDWIN32_BIN)\$(TARGET).exe
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 | # Lib rule - dummy rule.
|
|---|
| 42 | lib:
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | # Exe rule - builds the target exe.
|
|---|
| 46 | $(OBJDIR)\$(TARGET).exe: $(OBJS) $(OBJDIR)\$(TARGET).lrf
|
|---|
| 47 | $(LD2) $(LD2FLAGS_ODINCRT) @$(OBJDIR)\$(TARGET).lrf
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | # Linker file - creates the parameter file passed on to the linker.
|
|---|
| 51 | $(OBJDIR)\$(TARGET).lrf: makefile
|
|---|
| 52 | @echo Creating file <<$@
|
|---|
| 53 | /OUT:$(OBJDIR)\$(TARGET).exe
|
|---|
| 54 | /MAP:$(OBJDIR)\$(TARGET).map
|
|---|
| 55 | /PMTYPE:pm
|
|---|
| 56 | /STACK:0x100000
|
|---|
| 57 | /NOBASE
|
|---|
| 58 | $(OBJS)
|
|---|
| 59 | os2386.lib
|
|---|
| 60 | <<keep
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 | # Dep rule - makes depenencies for C, C++ and Asm files.
|
|---|
| 64 | dep:
|
|---|
| 65 | $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
|
|---|
| 66 | *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 | # Includes the common rules.
|
|---|
| 70 | !include $(PDWIN32_INCLUDE)/pdwin32.post
|
|---|
| 71 |
|
|---|