write GNUmakefile for GNUstep application

文章提供了如何在Linux(最好是Linux)和macOS系统上利用GNUstep环境学习Objective-C的步骤。内容包括编写makefile,设置GNUSTEP_MAKEFILES变量,包含必要的makefile部分,以及运行应用程序的命令。
摘要由CSDN通过智能技术生成

how to learn objective-c

  1. use GNUstep on linux(better linux)
  2. macOS(best)

[CHECK] Write a makefile

# GNUmakefile - Generated by ProjectCenter
ifeq ($(GNUSTEP_MAKEFILES),)
 GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
  ifeq ($(GNUSTEP_MAKEFILES),)
    $(warning )
    $(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
    $(warning Perhaps gnustep-make is not properly installed,)
    $(warning so gnustep-config is not in your PATH.)
    $(warning )
    $(warning Your PATH is currently $(PATH))
    $(warning )
  endif
endif
ifeq ($(GNUSTEP_MAKEFILES),)
 $(error You need to set GNUSTEP_MAKEFILES before compiling!)
endif

include $(GNUSTEP_MAKEFILES)/common.make # SUPER Importanct

# Application

VERSION = 0.1
PACKAGE_NAME = gg # NAME OF APPLICATION 
APP_NAME = gg
gg_APPLICATION_ICON = 

# Resource files

gg_RESOURCE_FILES = \
Resources/gg.gorm \

# Header files

gg_HEADER_FILES = \
AppController.h

# Objective-C Class files

gg_OBJC_FILES = \
AppController.m

# Other sources

gg_OBJC_FILES += \
gg_main.m 

# Makefiles

include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/aggregate.make
include $(GNUSTEP_MAKEFILES)/application.make # SUPER Important
include GNUmakefile.postamble

run command

make 
make clean

Try mixup with Progamming language C and that’s why I learn it

  1. import <stdio.h>
  2. import <stdlib.h>

[!!!] Add .h/.m file then add to GNUmakefile

openapp

openapp ./gg.app #for example that gg application
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值