Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
/ make-uwp Public archive

Compiling template (Makefile)

License

Notifications You must be signed in to change notification settings

basharast/make-uwp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Makefile Template (UWP)

If you are new to compiling using makefile's and you want to compile something to support (UWP),

then this simple template will help you to understand how the progress is working

It's organized and easy to change.

  • Normal template (manually add .c,.cpp files)
  • Loop template (will auto compile every .c,.cpp file)

Tools

Usage

In Makefile you will find:

  • TargetArch your target arch
  • TARGET_NAME the name of dll or lib (without extension)
  • STATIC_LINKING if you want the output as lib
  • VsInstallCommunity VS installation dir
  • WindowsSdkDir SDK dir
  • WindowsSDKVersion Target build number
  • INCFLAGS include folders -I"$(RootDir)/foldername" or -I"fullpath" [always use /]
  • LIBS libraries to include [for linker]
  • MSVCCompileFlags custom defines -DVARIABLENAME [-D is fixed at the start, means define]

Add c/c++ files

  • Open Makefile.common
  • SOURCES_C for .c files
  • SOURCES_CXX for .cpp files

Example (Normal):

SOURCES_C += \
               file1.c \
	       file2.c \
	       file3.c
			
SOURCES_CXX += \
               file1.cpp \
	       file2.cpp \
	       file3.cpp

Example (Loop):

SOURCES_C +=  *.c       \
              src/*.c   \
              src/*/*.c \
              src/*/*/*.c
			
SOURCES_CXX   +=  *.cpp       \
                  src/*.cpp   \
                  src/*/*.cpp \
                  src/*/*/*.cpp

Build

From msys2:

  • cd "fullpath_to_library"
  • make -f Makefile

Clean

  • cd "fullpath_to_library"
  • make -f Makefile clean

About

Compiling template (Makefile)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published